mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Improve naming for 'at date' in user render component
This commit is contained in:
@@ -24,7 +24,7 @@ class UserRender implements ChillEntityRenderInterface
|
||||
'main_scope' => true,
|
||||
'user_job' => true,
|
||||
'absence' => true,
|
||||
'at' => null,
|
||||
'at_date' => null,
|
||||
];
|
||||
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator)
|
||||
@@ -47,14 +47,14 @@ class UserRender implements ChillEntityRenderInterface
|
||||
|
||||
$str = $entity->getLabel();
|
||||
|
||||
if (null !== $entity->getUserJob($opts['at']) && $opts['user_job']) {
|
||||
if (null !== $entity->getUserJob($opts['at_date']) && $opts['user_job']) {
|
||||
$str .= ' ('.$this->translatableStringHelper
|
||||
->localize($entity->getUserJob($opts['at'])->getLabel()).')';
|
||||
->localize($entity->getUserJob($opts['at_date'])->getLabel()).')';
|
||||
}
|
||||
|
||||
if (null !== $entity->getMainScope($opts['at']) && $opts['main_scope']) {
|
||||
if (null !== $entity->getMainScope($opts['at_date']) && $opts['main_scope']) {
|
||||
$str .= ' ('.$this->translatableStringHelper
|
||||
->localize($entity->getMainScope($opts['at'])->getName()).')';
|
||||
->localize($entity->getMainScope($opts['at_date'])->getName()).')';
|
||||
}
|
||||
|
||||
if ($entity->isAbsent() && $opts['absence']) {
|
||||
|
Reference in New Issue
Block a user