本文整理汇总了PHP中Pimcore\Config::getAvailablePerspectives方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::getAvailablePerspectives方法的具体用法?PHP Config::getAvailablePerspectives怎么用?PHP Config::getAvailablePerspectives使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimcore\Config
的用法示例。
在下文中一共展示了Config::getAvailablePerspectives方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFirstAllowedPerspective
/**
* Returns the first perspective name
*
* @return string
*/
public function getFirstAllowedPerspective()
{
$perspectives = $this->getMergedPerspectives();
if (!empty($perspectives)) {
return $perspectives[0];
} else {
// all perspectives are allowed
$perspectives = \Pimcore\Config::getAvailablePerspectives($this);
return $perspectives[0]["name"];
}
}
示例2: roleGetAction
public function roleGetAction()
{
$role = User\Role::getById(intval($this->getParam("id")));
// workspaces
$types = ["asset", "document", "object"];
foreach ($types as $type) {
$workspaces = $role->{"getWorkspaces" . ucfirst($type)}();
foreach ($workspaces as $workspace) {
$el = Element\Service::getElementById($type, $workspace->getCid());
if ($el) {
// direct injection => not nice but in this case ok ;-)
$workspace->path = $el->getRealFullPath();
}
}
}
// get available permissions
$availableUserPermissionsList = new User\Permission\Definition\Listing();
$availableUserPermissions = $availableUserPermissionsList->load();
$availablePerspectives = \Pimcore\Config::getAvailablePerspectives(null);
$this->_helper->json(["success" => true, "role" => $role, "permissions" => $role->generatePermissionList(), "classes" => $role->getClasses(), "docTypes" => $role->getDocTypes(), "availablePermissions" => $availableUserPermissions, "availablePerspectives" => $availablePerspectives]);
}
示例3:
?>
,
videoconverter: <?php
echo \Zend_Json::encode(\Pimcore\Video::isAvailable());
?>
,
asset_hide_edit: <?php
echo $this->config->assets->hide_edit_image ? "true" : "false";
?>
,
perspective: <?php
echo \Zend_Json::encode($runtimePerspective);
?>
,
availablePerspectives: <?php
echo \Zend_Json::encode(\Pimcore\Config::getAvailablePerspectives(\Pimcore\Tool\Admin::getCurrentUser()));
?>
,
customviews: <?php
echo \Zend_Json::encode($this->customview_config);
?>
,
disabledPortlets: <?php
echo \Zend_Json::encode((new \Pimcore\Helper\Dashboard(\Pimcore\Tool\Admin::getCurrentUser()))->getDisabledPortlets());
?>
};
</script>
<?php
// 3rd party libraries