Merge branch 'person-docgen-context-with-3party' into 'master'

Feature: [person][docgen] Add a title to document in person docgen

See merge request Chill-Projet/chill-bundles!461
This commit is contained in:
Julien Fastré 2022-10-24 07:56:02 +00:00
commit 307fdfd0ba

View File

@ -42,6 +42,9 @@ class BaseContextData
$data['createdAt'] = $this->normalizer->normalize(new DateTimeImmutable(), 'docgen', [ $data['createdAt'] = $this->normalizer->normalize(new DateTimeImmutable(), 'docgen', [
'docgen:expects' => DateTimeImmutable::class, 'groups' => ['docgen:read'], 'docgen:expects' => DateTimeImmutable::class, 'groups' => ['docgen:read'],
]); ]);
$data['createdAtDate'] = $this->normalizer->normalize(new DateTimeImmutable('today'), 'docgen', [
'docgen:expects' => DateTimeImmutable::class, 'groups' => ['docgen:read'],
]);
$data['location'] = $this->normalizer->normalize( $data['location'] = $this->normalizer->normalize(
$user instanceof User ? $user->getCurrentLocation() : null, $user instanceof User ? $user->getCurrentLocation() : null,
'docgen', 'docgen',