mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add id to docgen normalization fo a person
This commit is contained in:
parent
3df2335cf4
commit
bf4a3a2c91
@ -74,6 +74,7 @@ class PersonDocGenNormalizer implements
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'type' => 'person',
|
'type' => 'person',
|
||||||
|
'id' => $person->getId(),
|
||||||
'isNull' => false,
|
'isNull' => false,
|
||||||
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expects' => Civility::class])),
|
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expects' => Civility::class])),
|
||||||
'firstName' => $person->getFirstName(),
|
'firstName' => $person->getFirstName(),
|
||||||
@ -151,7 +152,7 @@ class PersonDocGenNormalizer implements
|
|||||||
$normalizer = new NormalizeNullValueHelper($this->normalizer, 'type', 'person');
|
$normalizer = new NormalizeNullValueHelper($this->normalizer, 'type', 'person');
|
||||||
|
|
||||||
$attributes = [
|
$attributes = [
|
||||||
'firstName', 'lastName', 'age', 'altNames', 'text',
|
'id', 'firstName', 'lastName', 'age', 'altNames', 'text',
|
||||||
'civility' => Civility::class,
|
'civility' => Civility::class,
|
||||||
'birthdate' => DateTimeInterface::class,
|
'birthdate' => DateTimeInterface::class,
|
||||||
'deathdate' => DateTimeInterface::class,
|
'deathdate' => DateTimeInterface::class,
|
||||||
|
@ -38,6 +38,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
|||||||
use ProphecyTrait;
|
use ProphecyTrait;
|
||||||
|
|
||||||
private const BLANK = [
|
private const BLANK = [
|
||||||
|
'id' => '',
|
||||||
'firstName' => '',
|
'firstName' => '',
|
||||||
'lastName' => '',
|
'lastName' => '',
|
||||||
'altNames' => '',
|
'altNames' => '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user