Add field in event for themes

This commit is contained in:
2025-04-29 10:03:42 +02:00
parent e7a1ff1ac8
commit 383f588795
7 changed files with 108 additions and 12 deletions

View File

@@ -47,18 +47,18 @@ class EventThemeRender implements ChillEntityRenderInterface
* @throws SyntaxError
* @throws LoaderError
*/
public function renderBox($eventTheme, array $options): string
public function renderBox($entity, array $options): string
{
$options = array_merge(self::DEFAULT_ARGS, $options);
// give some help to twig: an array of parents
$parents = $this->buildParents($eventTheme);
$parents = $this->buildParents($entity);
return $this
->engine
->render(
'@ChillEvent/Entity/event_theme.html.twig',
[
'eventTheme' => $eventTheme,
'eventTheme' => $entity,
'parents' => $parents,
'options' => $options,
]
@@ -76,7 +76,7 @@ class EventThemeRender implements ChillEntityRenderInterface
while ($entity->hasParent()) {
$entity = $entity->getParent();
$titles[] = $this->translatableStringHelper->localize(
$entity->getTitle()
$entity->getName()
);
}