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


PHP Context::getPermissionDetails方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Context::getPermissionDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::getPermissionDetails方法的具体用法?PHP Context::getPermissionDetails怎么用?PHP Context::getPermissionDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Context的用法示例。


在下文中一共展示了Context::getPermissionDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runGetBackdropPartial


//.........这里部分代码省略.........
                 break;
             case 'issue_subscribers':
                 $template_name = 'main/issuesubscribers';
                 break;
             case 'issue_spenttimes':
                 $template_name = 'main/issuespenttimes';
                 $options['initial_view'] = $request->getParameter('initial_view', 'list');
                 break;
             case 'issue_spenttime':
                 $template_name = 'main/issuespenttime';
                 $options['entry_id'] = $request->getParameter('entry_id');
                 break;
             case 'relate_issue':
                 $template_name = 'main/relateissue';
                 break;
             case 'project_build':
                 $template_name = 'project/build';
                 $options['project'] = entities\Project::getB2DBTable()->selectById($request['project_id']);
                 if ($request->hasParameter('build_id')) {
                     $options['build'] = entities\Build::getB2DBTable()->selectById($request['build_id']);
                 }
                 break;
             case 'project_icons':
                 $template_name = 'project/projecticons';
                 $options['project'] = entities\Project::getB2DBTable()->selectById($request['project_id']);
                 break;
             case 'project_workflow':
                 $template_name = 'project/projectworkflow';
                 $options['project'] = entities\Project::getB2DBTable()->selectById($request['project_id']);
                 break;
             case 'permissions':
                 $options['key'] = $request['permission_key'];
                 $target_module = $request['target_module'] !== 'core' ? $request['target_module'] : null;
                 if ($details = framework\Context::getPermissionDetails($options['key'], null, $target_module)) {
                     $template_name = 'configuration/permissionspopup';
                     $options['mode'] = $request['mode'];
                     $options['module'] = $request['target_module'];
                     $options['target_id'] = $request['target_id'];
                     $options['item_name'] = $details['description'];
                     $options['access_level'] = $request['access_level'];
                 }
                 break;
             case 'issuefield_permissions':
                 $options['item_key'] = $request['item_key'];
                 if ($details = framework\Context::getPermissionDetails($options['item_key'])) {
                     $template_name = 'configuration/issuefieldpermissions';
                     $options['item_name'] = $details['description'];
                     $options['item_id'] = $request['item_id'];
                     $options['access_level'] = $request['access_level'];
                 }
                 break;
             case 'site_icons':
                 $template_name = 'configuration/siteicons';
                 break;
             case 'project_config':
                 $template_name = 'project/projectconfig_container';
                 $project = entities\Project::getB2DBTable()->selectById($request['project_id']);
                 $options['project'] = $project;
                 $options['section'] = $request->getParameter('section', 'info');
                 if ($request->hasParameter('edition_id')) {
                     $edition = entities\Edition::getB2DBTable()->selectById($request['edition_id']);
                     $options['edition'] = $edition;
                     $options['selected_section'] = $request->getParameter('section', 'general');
                 }
                 break;
             case 'issue_add_item':
开发者ID:nrensen,项目名称:thebuggenie,代码行数:67,代码来源:Main.php

示例2: foreach

<ul class="simple_list">
<?php 
if (count($role->getPermissions())) {
    ?>
    <?php 
    foreach ($role->getPermissions() as $permission) {
        ?>
        <?php 
        $permission_details = $permission->getModule() == 'core' ? \thebuggenie\core\framework\Context::getPermissionDetails($permission->getPermission()) : \thebuggenie\core\framework\Context::getModule($permission->getModule())->getPermissionDetails($permission->getPermission());
        ?>
        <li>
            <?php 
        echo image_tag('action_ok.png', array('style' => 'margin: 2px 5px -2px 0;'));
        echo array_key_exists('description', $permission_details) ? $permission_details['description'] : $permission;
        ?>
        </li>
    <?php 
    }
} else {
    ?>
    <li class="faded_out"><?php 
    echo __('This role does not have any associated permissions');
    ?>
</li>
<?php 
}
?>
</ul>
开发者ID:founderio,项目名称:thebuggenie,代码行数:28,代码来源:_rolepermissionslist.inc.php


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