mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Correct repository and normalizer
This commit is contained in:
parent
052e09cf64
commit
7520d746e8
@ -2,6 +2,16 @@
|
||||
|
||||
namespace Chill\MainBundle\Repository;
|
||||
|
||||
use Chill\MainBundle\Entity\Gender;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
use UnexpectedValueException;
|
||||
|
||||
class GenderRepository extends EntityRepository {}
|
||||
class GenderRepository extends ServiceEntityRepository {
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Gender::class);
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class PersonDocGenNormalizer implements
|
||||
'age' => (int) $person->getAge(),
|
||||
'birthdate' => $this->normalizer->normalize($person->getBirthdate(), $format, $dateContext),
|
||||
'deathdate' => $this->normalizer->normalize($person->getDeathdate(), $format, $dateContext),
|
||||
'gender' => $this$this->translator->trans($person->getGender()),
|
||||
'gender' => $this->translator->trans($person->getGender()),
|
||||
'maritalStatus' => null !== ($ms = $person->getMaritalStatus()) ? $this->translatableStringHelper->localize($ms->getName()) : '',
|
||||
'maritalStatusDate' => $this->normalizer->normalize($person->getMaritalStatusDate(), $format, $dateContext),
|
||||
'maritalStatusComment' => $this->normalizer->normalize($person->getMaritalStatusComment(), $format, $dateContext),
|
||||
|
Loading…
x
Reference in New Issue
Block a user