Commit 9f235afa authored by Henning Leutz's avatar Henning Leutz 🥋

Merge branch 'dev'

parents 9064ff78 6da95366
This diff is collapsed.
......@@ -887,13 +887,37 @@ class Manager
}
}
$type = $Brick->getAttribute('type');
$checkType = function ($type) {
if ($type === 'content') {
return true;
}
if (\is_callable($type)) {
return true;
}
if (\class_exists($type)) {
return true;
}
throw new QUI\Exception(
'quiqqer/bricks',
'exception.type.is.not.allowed'
);
};
$checkType($type);
// update
QUI::getDataBase()->update($this->getTable(), [
'title' => $Brick->getAttribute('title'),
'frontendTitle' => $Brick->getAttribute('frontendTitle'),
'description' => $Brick->getAttribute('description'),
'content' => $Brick->getAttribute('content'),
'type' => $Brick->getAttribute('type'),
'type' => $type,
'settings' => \json_encode($Brick->getSettings()),
'customfields' => \json_encode($customfields),
'areas' => $areaString,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment