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


PHP TBGContext::getAvailablePermissions方法代码示例

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


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

示例1: _getPermissionListFromKey

 protected function _getPermissionListFromKey($key, $permissions = null)
 {
     if ($permissions === null) {
         $permissions = TBGContext::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:oparoz,项目名称:thebuggenie,代码行数:14,代码来源:actioncomponents.class.php

示例2: include_template

 <span class="faded_out smaller"><?php 
        echo $project->getKey();
        ?>
</span></a>
						<ul style="display: none;" id="project_permission_details_<?php 
        echo $project->getID();
        ?>
">
							<?php 
        include_template('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_project_permissions', 'permissions_list' => TBGContext::getAvailablePermissions('project'), 'mode' => 'general', 'target_id' => $project->getID(), 'module' => 'core', 'user_id' => $user_id, 'access_level' => $access_level));
        ?>
							<?php 
        include_template('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_page_permissions', 'permissions_list' => TBGContext::getAvailablePermissions('project_pages'), 'mode' => 'project_pages', 'target_id' => $project->getID(), 'module' => 'core', 'user_id' => $user_id, 'access_level' => $access_level));
        ?>
							<?php 
        include_template('configuration/permissionsblock', array('base_id' => $base_id . 'project_' . $project->getID() . '_issue_permissions', 'permissions_list' => TBGContext::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:ronaldbroens,项目名称:thebuggenie,代码行数:31,代码来源:_permissionsconfigurator.inc.php

示例3: htmlentities

echo htmlentities($role->getName(), ENT_COMPAT, TBGContext::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_template('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => TBGContext::getAvailablePermissions('project'), 'module' => 'core', 'target_id' => null));
?>
	<?php 
include_template('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => TBGContext::getAvailablePermissions('project_pages'), 'module' => 'core', 'target_id' => null));
?>
	<?php 
include_template('configuration/rolepermissionseditlist', array('role' => $role, 'permissions_list' => TBGContext::getAvailablePermissions('issues'), 'module' => 'core', 'target_id' => null));
?>
	<?php 
TBGEvent::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:oparoz,项目名称:thebuggenie,代码行数:30,代码来源:_rolepermissionsedit.inc.php


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