mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
[person] Add a PersonRenderInterface
This commit is contained in:
parent
f2221565c5
commit
3aa12d2e8c
@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Templating\Entity;
|
||||
use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender;
|
||||
use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
@ -22,7 +23,7 @@ use function array_key_exists;
|
||||
/**
|
||||
* Render a Person.
|
||||
*/
|
||||
class PersonRender extends AbstractChillEntityRender
|
||||
class PersonRender extends AbstractChillEntityRender implements PersonRenderInterface
|
||||
{
|
||||
private ConfigPersonAltNamesHelper $configAltNamesHelper;
|
||||
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Templating\Entity;
|
||||
|
||||
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
|
||||
/**
|
||||
* Render a Person.
|
||||
*/
|
||||
interface PersonRenderInterface extends ChillEntityRenderInterface
|
||||
{
|
||||
/**
|
||||
* @param Person $person
|
||||
*/
|
||||
public function renderBox($person, array $options): string;
|
||||
|
||||
/**
|
||||
* @param Person $person
|
||||
*/
|
||||
public function renderString($person, array $options): string;
|
||||
|
||||
public function supports($entity, array $options): bool;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user