當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Context::getAvailablePermissions方法代碼示例

本文整理匯總了PHP中thebuggenie\core\framework\Context::getAvailablePermissions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::getAvailablePermissions方法的具體用法?PHP Context::getAvailablePermissions怎麽用?PHP Context::getAvailablePermissions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在thebuggenie\core\framework\Context的用法示例。


在下文中一共展示了Context::getAvailablePermissions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: htmlentities

echo htmlentities($role->getName(), ENT_COMPAT, \thebuggenie\core\framework\Context::getI18n()->getCharset());
?>
" style="width: 300px;"><br>
    <div style="margin-top: 10px; font-weight: bold;"><?php 
echo __('Role permissions');
?>
</div>
    <ul class="simple_list" style="display: block; width: auto;">
    <?php 
include_component('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('project'), 'module' => 'core', 'target_id' => null));
?>
    <?php 
include_component('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('project_pages'), 'module' => 'core', 'target_id' => null));
?>
    <?php 
include_component('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('issues'), 'module' => 'core', 'target_id' => null));
?>
    <?php 
\thebuggenie\core\framework\Event::createNew('core', 'rolepermissionsedit', $role)->trigger();
?>
    </ul>
    <input type="submit" value="<?php 
echo __('Save role');
?>
" style="float: right;">
    <?php 
echo image_tag('spinning_16.gif', array('id' => "role_{$role->getID()}_form_indicator", 'style' => 'display: none; float: right; margin-right: 5px;'));
?>
    <br style="clear: both;">
</form>
開發者ID:founderio,項目名稱:thebuggenie,代碼行數:30,代碼來源:_rolepermissionsedit.inc.php

示例2: include_component

</span></a>
                        <ul style="display: none;" id="<?php 
        echo $base_id;
        ?>
_project_permission_details_<?php 
        echo $project->getID();
        ?>
">
                            <?php 
        include_component('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_project_permissions', 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('project'), 'mode' => 'general', 'target_id' => $project->getID(), 'module' => 'core', 'user_id' => $user_id, 'access_level' => $access_level));
        ?>
                            <?php 
        include_component('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_page_permissions', 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('project_pages'), 'mode' => 'project_pages', 'target_id' => $project->getID(), 'module' => 'core', 'user_id' => $user_id, 'access_level' => $access_level));
        ?>
                            <?php 
        include_component('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_issue_permissions', 'permissions_list' => \thebuggenie\core\framework\Context::getAvailablePermissions('issues'), 'mode' => 'general', 'target_id' => $project->getID(), 'module' => 'core', 'user_id' => $user_id, 'access_level' => $access_level));
        ?>
                        </ul>
                    </li>
                <?php 
    }
    ?>
            </ul>
        <?php 
} else {
    ?>
            <div class="faded_out" style="padding: 2px;"><?php 
    echo __('There are no projects');
    ?>
</div>
        <?php 
開發者ID:founderio,項目名稱:thebuggenie,代碼行數:31,代碼來源:_permissionsconfigurator.inc.php

示例3: _getPermissionListFromKey

 protected function _getPermissionListFromKey($key, $permissions = null)
 {
     if ($permissions === null) {
         $permissions = framework\Context::getAvailablePermissions();
     }
     foreach ($permissions as $pkey => $permission) {
         if ($pkey == $key) {
             return array_key_exists('details', $permission) ? $permission['details'] : array();
         } elseif (array_key_exists('details', $permission) && count($permission['details']) > 0 && ($plist = $this->_getPermissionListFromKey($key, $permission['details']))) {
             return $plist;
         }
     }
     return array();
 }
開發者ID:founderio,項目名稱:thebuggenie,代碼行數:14,代碼來源:Components.php


注:本文中的thebuggenie\core\framework\Context::getAvailablePermissions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。