mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Feature: [docgen] Add a new variable createdAtDate, which contains date
without date and time This is useful when generating a letter, to fill the today's date in the letter's header.
This commit is contained in:
parent
ea5f8c9d08
commit
719256913c
@ -42,6 +42,9 @@ class BaseContextData
|
||||
$data['createdAt'] = $this->normalizer->normalize(new DateTimeImmutable(), 'docgen', [
|
||||
'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(
|
||||
$user instanceof User ? $user->getCurrentLocation() : null,
|
||||
'docgen',
|
||||
|
Loading…
x
Reference in New Issue
Block a user