mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +00:00
Add external identifiers for person, editable in edit form, with minimal features associated
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\PersonIdentifier\Rendering;
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFilter;
|
||||
|
||||
final class PersonIdRenderingTwigExtension extends AbstractExtension
|
||||
{
|
||||
public function __construct(private readonly PersonIdRenderingInterface $personIdRendering) {}
|
||||
|
||||
public function getFilters(): array
|
||||
{
|
||||
return [
|
||||
new TwigFilter(
|
||||
'chill_person_id_render_text',
|
||||
fn (Person $person): string => $this->personIdRendering->renderPersonId($person)
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user