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


PHP TBGContext::getPermissionDetails方法代码示例

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


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

示例1: runGetBackdropPartial


//.........这里部分代码省略.........
                 $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 'milestone':
                 $template_name = 'project/milestone';
                 $options['project'] = TBGContext::factory()->TBGProject($request['project_id']);
                 if ($request->hasParameter('milestone_id')) {
                     $options['milestone'] = TBGContext::factory()->TBGMilestone($request['milestone_id']);
                 }
                 break;
             case 'project_build':
                 $template_name = 'project/build';
                 $options['project'] = TBGContext::factory()->TBGProject($request['project_id']);
                 if ($request->hasParameter('build_id')) {
                     $options['build'] = TBGContext::factory()->TBGBuild($request['build_id']);
                 }
                 break;
             case 'project_icons':
                 $template_name = 'project/projecticons';
                 $options['project'] = TBGContext::factory()->TBGProject($request['project_id']);
                 break;
             case 'project_workflow':
                 $template_name = 'project/projectworkflow';
                 $options['project'] = TBGContext::factory()->TBGProject($request['project_id']);
                 break;
             case 'permissions':
                 $options['key'] = $request['permission_key'];
                 if ($details = TBGContext::getPermissionDetails($options['key'])) {
                     $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 = TBGContext::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'];
                 } else {
                     die('fu');
                 }
                 break;
             case 'site_icons':
                 $template_name = 'configuration/siteicons';
                 break;
             case 'project_config':
                 $template_name = 'project/projectconfig_container';
                 $project = TBGContext::factory()->TBGProject($request['project_id']);
                 $options['project'] = $project;
                 $options['section'] = $request->getParameter('section', 'info');
                 if ($request->hasParameter('edition_id')) {
                     $edition = TBGContext::factory()->TBGEdition($request['edition_id']);
                     $options['edition'] = $edition;
                     $options['selected_section'] = $request->getParameter('section', 'general');
                 }
开发者ID:oparoz,项目名称:thebuggenie,代码行数:67,代码来源:actions.class.php

示例2: foreach

<ul class="simple_list">
<?php 
if (count($role->getPermissions())) {
    ?>
	<?php 
    foreach ($role->getPermissions() as $permission) {
        ?>
		<?php 
        $permission_details = $permission->getModule() == 'core' ? TBGContext::getPermissionDetails($permission->getPermission()) : TBGContext::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:oparoz,项目名称:thebuggenie,代码行数:28,代码来源:_rolepermissionslist.inc.php


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