mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 17:15:02 +00:00
Add field in event for themes
This commit is contained in:
@@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user