mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
PersonRender: adapt twig template to suffixText
This commit is contained in:
parent
81b7b49170
commit
02716a6a93
@ -12,6 +12,7 @@
|
|||||||
* hLevel integer
|
* hLevel integer
|
||||||
* addDeath bool
|
* addDeath bool
|
||||||
* addAgeBadge bool
|
* addAgeBadge bool
|
||||||
|
* suffixText bool
|
||||||
* address_multiline bool
|
* address_multiline bool
|
||||||
* customButtons [
|
* customButtons [
|
||||||
'before' Twig\Markup, (injected with macro)
|
'before' Twig\Markup, (injected with macro)
|
||||||
@ -46,6 +47,11 @@
|
|||||||
<span>({{- 'years_old'|trans({ 'age': person.age }) -}})</span>
|
<span>({{- 'years_old'|trans({ 'age': person.age }) -}})</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{%- if options['suffixText'] is defined -%}
|
||||||
|
{% for o in options['suffixText'] %}
|
||||||
|
<span>{{ o }}</span>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endmacro raw %}
|
{% endmacro raw %}
|
||||||
|
|
||||||
{% macro label(person, options) %}
|
{% macro label(person, options) %}
|
||||||
|
@ -60,6 +60,7 @@ class PersonRender extends AbstractChillEntityRender implements PersonRenderInte
|
|||||||
'customArea' => $options['customArea'] ?? [],
|
'customArea' => $options['customArea'] ?? [],
|
||||||
'addDeath' => $options['addDeath'] ?? true,
|
'addDeath' => $options['addDeath'] ?? true,
|
||||||
'addAgeBadge' => $options['addAgeBadge'] ?? false,
|
'addAgeBadge' => $options['addAgeBadge'] ?? false,
|
||||||
|
'suffixText' => $options['suffixText'] ?? [],
|
||||||
];
|
];
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -12,7 +12,6 @@ declare(strict_types=1);
|
|||||||
namespace Chill\PersonBundle\Templating\Entity;
|
namespace Chill\PersonBundle\Templating\Entity;
|
||||||
|
|
||||||
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render a Person.
|
* Render a Person.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user