Merge branch 'develop'
This commit is contained in:
commit
9cf95dba64
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue