當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。