當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。