Merge branch 'develop'

This commit is contained in:
Simon Vieille 2024-05-14 22:13:44 +02:00
commit 9cf95dba64
2 changed files with 9 additions and 0 deletions

View file

@ -20,6 +20,11 @@ class BuilderBlockContainer
return $this->widgets;
}
public function hasWidget(string $name)
{
return isset($this->widgets[$name]);
}
public function getWidget(string $name): BuilderBlock
{
return $this->widgets[$name];

View file

@ -30,6 +30,10 @@ class BuilderExtension extends AbstractExtension
}
if (isset($data['widget'])) {
if (!$this->container->hasWidget($data['widget'])) {
return '';
}
$widget = $this->container->getWidget($data['widget']);
$widget->buildVars($data);