本文整理汇总了PHP中Pimcore\Model\Object\Service::createSuperLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Service::createSuperLayout方法的具体用法?PHP Service::createSuperLayout怎么用?PHP Service::createSuperLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimcore\Model\Object\Service
的用法示例。
在下文中一共展示了Service::createSuperLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fieldcollectionListAction
public function fieldcollectionListAction()
{
$user = \Pimcore\Tool\Admin::getCurrentUser();
$currentLayoutId = $this->getParam("layoutId");
$list = new Object\Fieldcollection\Definition\Listing();
$list = $list->load();
if ($this->hasParam("allowedTypes")) {
$filteredList = [];
$allowedTypes = explode(",", $this->getParam("allowedTypes"));
/** @var $type Object\Fieldcollection\Definition */
foreach ($list as $type) {
if (in_array($type->getKey(), $allowedTypes)) {
$filteredList[] = $type;
// mainly for objects-meta data-type
$layoutDefinitions = $type->getLayoutDefinitions();
Object\Service::enrichLayoutDefinition($layoutDefinitions, null);
if ($currentLayoutId == -1 && $user->isAdmin()) {
Object\Service::createSuperLayout($layoutDefinitions);
}
}
}
$list = $filteredList;
}
$this->_helper->json(["fieldcollections" => $list]);
}