本文整理汇总了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);
}