当前位置: 首页>>代码示例>>PHP>>正文


PHP Config::getAvailablePerspectives方法代码示例

本文整理汇总了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"];
     }
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:16,代码来源:User.php

示例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]);
 }
开发者ID:solverat,项目名称:pimcore,代码行数:21,代码来源:UserController.php

示例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
开发者ID:pimcore,项目名称:pimcore,代码行数:31,代码来源:index6.php


注:本文中的Pimcore\Config::getAvailablePerspectives方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。