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