本文整理匯總了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);
}
示例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;
}
示例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>
示例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);
}
}
示例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>
示例6: getWorkflowRequestPermissionKeyObject
public function getWorkflowRequestPermissionKeyObject()
{
return PermissionKey::getByID($this->pkID);
}