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


PHP PermissionKey::getByID方法代码示例

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


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

示例1: trigger

 public function trigger()
 {
     $page = Page::getByID($this->cID);
     $pk = PermissionKey::getByID($this->pkID);
     $pk->setPermissionObject($page);
     return parent::trigger($pk);
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:7,代码来源:page.php

示例2: approve

 public function approve(WorkflowProgress $wp)
 {
     $c = Page::getByID($this->getRequestedPageID());
     $ps = $this->getPagePermissionSet();
     $assignments = $ps->getPermissionAssignments();
     foreach ($assignments as $pkID => $paID) {
         $pk = PermissionKey::getByID($pkID);
         $pk->setPermissionObject($c);
         $pt = $pk->getPermissionAssignmentObject();
         $pt->clearPermissionAssignment();
         if ($paID > 0) {
             $pa = PermissionAccess::getByID($paID, $pk);
             if (is_object($pa)) {
                 $pt->assignPermissionAccess($pa);
             }
         }
     }
     $c->refreshCache();
     $wpr = new WorkflowProgressResponse();
     $wpr->setWorkflowProgressResponseURL(BASE_URL . DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $c->getCollectionID());
     return $wpr;
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:22,代码来源:change_page_permissions.php

示例3: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
?>

<?php 
$pk = PermissionKey::getByID($_REQUEST['pkID']);
$pk->setPermissionObject($fileset);
?>

<?php 
Loader::element("permission/detail", array('permissionKey' => $pk));
?>

<script type="text/javascript">
var ccm_permissionDialogURL = '<?php 
echo REL_DIR_FILES_TOOLS_REQUIRED;
?>
/permissions/dialogs/file_set'; 
</script>
开发者ID:ceko,项目名称:concrete5-1,代码行数:20,代码来源:file_set.php

示例4: loadPermissionAssignments

 protected function loadPermissionAssignments()
 {
     $db = Loader::db();
     $r = $db->Execute('select pkID, paID from PagePermissionAssignments where cID = ?', array($this->getPermissionsCollectionID()));
     while ($row = $r->FetchRow()) {
         $pk = PermissionKey::getByID($row['pkID']);
         $pk->setPermissionObject($this);
         $this->permissionAssignments[$row['pkID']] = PermissionAccess::getByID($row['paID'], $pk);
     }
 }
开发者ID:ronlobo,项目名称:concrete5-de,代码行数:10,代码来源:page.php

示例5: foreach

$wp = PageWorkflowProgress::getByID($_REQUEST['wpID']);
if (is_object($wp)) {
	$w = $wp->getWorkflowObject();
	if ($w->canApproveWorkflowProgressObject($wp)) {
		$req = $wp->getWorkflowRequestObject();
		if (is_object($req)) { 
		$c = Page::getByID($req->getRequestedPageID(), 'RECENT');
		?>

<div class="ccm-ui">
<table class="ccm-permission-grid table table-striped">

<? 
$ps = $req->getPagePermissionSet();
foreach($ps->getPermissionAssignments() as $pkID => $paID) { 
	$pk = PermissionKey::getByID($pkID);
	$pk->setPermissionObject($c);
?>
<tr>
	<td class="ccm-permission-grid-name"><strong><?php 
echo $pk->getPermissionKeyName();
?>
</td>
	<td>
	<? $pa = PermissionAccess::getByID($paID, $pk); 
	Loader::element('permission/labels', array('pa' => $pa, 'pk' => $pk))?>
	</td>
</tr>
<? } ?>
</table>
</div>
开发者ID:nveid,项目名称:concrete5,代码行数:31,代码来源:change_page_permissions.php

示例6: getWorkflowRequestPermissionKeyObject

 public function getWorkflowRequestPermissionKeyObject()
 {
     return PermissionKey::getByID($this->pkID);
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:4,代码来源:model.php


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