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


PHP PermissionKey::getList方法代码示例

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


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

示例1: save

 public function save()
 {
     if (Loader::helper('validation/token')->validate('save_permissions')) {
         $fs = FileSet::getGlobal();
         $tp = new TaskPermission();
         if ($tp->canAccessTaskPermissions()) {
             $permissions = PermissionKey::getList('file_set');
             foreach ($permissions as $pk) {
                 $pk->setPermissionObject($fs);
                 $paID = $_POST['pkID'][$pk->getPermissionKeyID()];
                 $pt = $pk->getPermissionAssignmentObject();
                 $pt->clearPermissionAssignment();
                 if ($paID > 0) {
                     $pa = PermissionAccess::getByID($paID, $pk);
                     if (is_object($pa)) {
                         $pt->assignPermissionAccess($pa);
                     }
                 }
             }
             $this->redirect('/dashboard/system/permissions/files', 'updated');
         }
     } else {
         $this->error->add(Loader::helper("validation/token")->getErrorMessage());
     }
 }
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:25,代码来源:files.php

示例2: save

 public function save()
 {
     if (Loader::helper('validation/token')->validate('save_permissions')) {
         $tp = new TaskPermission();
         if ($tp->canAccessTaskPermissions()) {
             $permissions = PermissionKey::getList('sitemap');
             $permissions = array_merge($permissions, PermissionKey::getList('marketplace_newsflow'));
             $permissions = array_merge($permissions, PermissionKey::getList('admin'));
             foreach ($permissions as $pk) {
                 $paID = $_POST['pkID'][$pk->getPermissionKeyID()];
                 $pt = $pk->getPermissionAssignmentObject();
                 $pt->clearPermissionAssignment();
                 if ($paID > 0) {
                     $pa = PermissionAccess::getByID($paID, $pk);
                     if (is_object($pa)) {
                         $pt->assignPermissionAccess($pa);
                     }
                 }
             }
             $this->redirect('/dashboard/system/permissions/tasks', 'updated');
         }
     } else {
         $this->error->add(Loader::helper("validation/token")->getErrorMessage());
     }
 }
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:25,代码来源:tasks.php

示例3: parseManual

 /**
  * @see \C5TL\Parser\DynamicItem::parseManual()
  */
 public function parseManual(\Gettext\Translations $translations, $concrete5version)
 {
     if (class_exists('\\PermissionKeyCategory', true) && method_exists('\\PermissionKeyCategory', 'getList')) {
         foreach (\PermissionKeyCategory::getList() as $pkc) {
             $pkcHandle = $pkc->getPermissionKeyCategoryHandle();
             foreach (\PermissionKey::getList($pkcHandle) as $pk) {
                 $this->addTranslation($translations, $pk->getPermissionKeyName(), 'PermissionKeyName');
                 $this->addTranslation($translations, $pk->getPermissionKeyDescription(), 'PermissionKeyDescription');
             }
         }
     }
 }
开发者ID:yakamoz-fang,项目名称:concrete,代码行数:15,代码来源:PermissionKey.php

示例4: updateDetails

	public function updateDetails($post) {
		$permissions = PermissionKey::getList('basic_workflow');
		foreach($permissions as $pk) {
			$pk->setPermissionObject($this);
			$pt = $pk->getPermissionAssignmentObject();
			$paID = $post['pkID'][$pk->getPermissionKeyID()];
			$pt->clearPermissionAssignment();
			if ($paID > 0) {
				$pa = PermissionAccess::getByID($paID, $pk);
				if (is_object($pa)) {
					$pt->assignPermissionAccess($pa);
				}			
			}		
		}			
	}
开发者ID:nveid,项目名称:concrete5,代码行数:15,代码来源:basic.php

示例5: approve

 public function approve(WorkflowProgress $wp)
 {
     $c = Page::getByID($this->getRequestedPageID());
     $permissions = PermissionKey::getList('page');
     $ps = $this->getPagePermissionSet();
     $assignments = $ps->getPermissionAssignments();
     foreach ($permissions as $pk) {
         $paID = $assignments[$pk->getPermissionKeyID()];
         $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:ronlobo,项目名称:concrete5-de,代码行数:23,代码来源:change_page_permissions.php

示例6:

<?php 
$cat = PermissionKeyCategory::getByHandle($handle);
?>

<form method="post" id="ccm-permission-list-form" action="<?php 
echo $cat->getToolsURL("save_permission_assignments");
?>
&amp;treeNodeID=<?php 
echo $node->getTreeNodeID();
?>
">

<table class="ccm-permission-grid table table-striped">
<?php 
$permissions = PermissionKey::getList($handle);
foreach ($permissions as $pk) {
    $pk->setPermissionObject($node);
    ?>
	<tr>
	<td class="ccm-permission-grid-name" id="ccm-permission-grid-name-<?php 
    echo $pk->getPermissionKeyID();
    ?>
"><strong><?php 
    if ($enablePermissions) {
        ?>
<a dialog-title="<?php 
        echo $pk->getPermissionKeyDisplayName();
        ?>
" data-pkID="<?php 
        echo $pk->getPermissionKeyID();
开发者ID:ceko,项目名称:concrete5-1,代码行数:30,代码来源:node.php

示例7: array

            $pe = PermissionAccessEntity::getByID($_REQUEST['peID']);
            $pa->removeListItem($pe);
        }
        if ($_REQUEST['task'] == 'save_permission' && Loader::helper("validation/token")->validate('save_permission')) {
            $pk = AreaPermissionKey::getByID($_REQUEST['pkID']);
            $pk->setPermissionObject($ax);
            $pa = PermissionAccess::getByID($_REQUEST['paID'], $pk);
            $pa->save($_POST);
        }
        if ($_REQUEST['task'] == 'display_access_cell' && Loader::helper("validation/token")->validate('display_access_cell')) {
            $pk = PermissionKey::getByID($_REQUEST['pkID']);
            $pa = PermissionAccess::getByID($_REQUEST['paID'], $pk);
            Loader::element('permission/labels', array('pk' => $pk, 'pa' => $pa));
        }
        if ($_REQUEST['task'] == 'save_permission_assignments' && Loader::helper("validation/token")->validate('save_permission_assignments')) {
            $permissions = PermissionKey::getList('area');
            foreach ($permissions as $pk) {
                $paID = $_POST['pkID'][$pk->getPermissionKeyID()];
                $pk->setPermissionObject($ax);
                $pt = $pk->getPermissionAssignmentObject();
                $pt->clearPermissionAssignment();
                if ($paID > 0) {
                    $pa = PermissionAccess::getByID($paID, $pk);
                    if (is_object($pa)) {
                        $pt->assignPermissionAccess($pa);
                    }
                }
            }
        }
    }
}
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:31,代码来源:area.php

示例8: file_sets_edit

	public function file_sets_edit(){
		extract($this->getHelperObjects());
		Loader::model('file_set');
		//do my editing
		if (!$validation_token->validate("file_sets_edit")) {			
			$this->set('error', array($validation_token->getErrorMessage()));
			$this->view();
			return;
		}
		
		if(!$this->post('fsID')){
			$this->set('error', array(t('Invalid ID')));
			$this->view();			
		}

		$file_set = new FileSet();
		$file_set->Load('fsID = ?', $this->post('fsID'));		
		$file_set->fsName = $this->post('file_set_name');
		$copyPermissionsFromBase = false;
		if ($file_set->fsOverrideGlobalPermissions == 0 && $this->post('fsOverrideGlobalPermissions') == 1) {
			// we are checking the checkbox for the first time
			$copyPermissionsFromBase = true;
		}		
		if ($file_set->fsOverrideGlobalPermissions) {
			$permissions = PermissionKey::getList('file_set');
			foreach($permissions as $pk) {
				$pk->setPermissionObject($file_set);
				$pt = $pk->getPermissionAssignmentObject();
				$paID = $_POST['pkID'][$pk->getPermissionKeyID()];
				$pt->clearPermissionAssignment();
				if ($paID > 0) {
					$pa = PermissionAccess::getByID($paID, $pk);
					if (is_object($pa)) {
						$pt->assignPermissionAccess($pa);
					}			
				}		
			}			
		}
		$file_set->fsOverrideGlobalPermissions = ($this->post('fsOverrideGlobalPermissions') == 1) ? 1 : 0;
		$file_set->save();
		
		parse_str($this->post('fsDisplayOrder'));
		$file_set->updateFileSetDisplayOrder($fID);

		if ($file_set->fsOverrideGlobalPermissions == 0) {
			$file_set->resetPermissions();		
		} 		
		if ($copyPermissionsFromBase) {
			$file_set->acquireBaseFileSetPermissions();
		}

		$this->redirect("/dashboard/files/sets", 'view_detail', $this->post('fsID'), 'file_set_updated');
	}
开发者ID:nveid,项目名称:concrete5,代码行数:53,代码来源:sets.php

示例9: defined

<?php

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

<?php 
$cat = PermissionKeyCategory::getByHandle('basic_workflow');
?>

<table class="ccm-permission-grid">
<?php 
$permissions = PermissionKey::getList('basic_workflow');
foreach ($permissions as $pk) {
    $pk->setPermissionObject($workflow);
    ?>
	<tr>
	<td class="ccm-permission-grid-name" id="ccm-permission-grid-name-<?php 
    echo $pk->getPermissionKeyID();
    ?>
"><strong><?php 
    if ($enablePermissions) {
        ?>
<a dialog-title="<?php 
        echo $pk->getPermissionKeyDisplayName();
        ?>
" data-pkID="<?php 
        echo $pk->getPermissionKeyID();
        ?>
" data-paID="<?php 
        echo $pk->getPermissionAccessID();
        ?>
开发者ID:Zyqsempai,项目名称:amanet,代码行数:31,代码来源:basic_workflow.php

示例10: foreach

        ?>

			<div class="<?php 
        if ($task == 'bulk_add_access') {
            ?>
form-inline<?php 
        }
        ?>
">

			<table class="ccm-permission-grid table">
				<tr>
				<td class="ccm-permission-grid-name" id="ccm-permission-grid-name-0">
					<select name="pkID">
					<?php 
        $permissions = PermissionKey::getList('page');
        foreach ($permissions as $pk) {
            ?>
						<option value="<?php 
            echo $pk->getPermissionKeyID();
            ?>
"><?php 
            echo $pk->getPermissionKeyDisplayName();
            ?>
</option>
					<?php 
        }
        ?>
					</select>
				</td>
				<td id="ccm-permission-grid-cell-0" class="ccm-permission-grid-cell-value" style="vertical-align: middle">
开发者ID:yakamoz-fang,项目名称:concrete,代码行数:31,代码来源:permissions_access.php

示例11: doOverrideAreaPermissions

	public function doOverrideAreaPermissions() {
		$db = Loader::db();
		$c = $this->getBlockCollectionObject();
		$v = array($c->getCollectionID(), $c->getVersionID(), $this->bID, $this->arHandle);
		$db->query("update CollectionVersionBlocks set cbOverrideAreaPermissions = 1 where cID = ? and (cvID = ? or cbIncludeAll = 1) and bID = ? and arHandle = ?", $v);
		$v = array($c->getCollectionID(), $c->getVersionID(), $this->bID);
		$db->query("delete from BlockPermissionAssignments where cID = ? and cvID = ? and bID = ?", $v);
		
		// copy permissions from the page to the area
		$permissions = PermissionKey::getList('block');
		foreach($permissions as $pk) { 
			$pk->setPermissionObject($this);
			$pk->copyFromPageOrAreaToBlock();
		}		
		$this->refreshCache();
	}
开发者ID:nveid,项目名称:concrete5,代码行数:16,代码来源:block.php

示例12: defined

<?php

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

<table class="ccm-permission-grid table table-striped">
<?php 
$permissions = PermissionKey::getList('sitemap');
$permissions = array_merge($permissions, PermissionKey::getList('marketplace_newsflow'));
$permissions = array_merge($permissions, PermissionKey::getList('admin'));
foreach ($permissions as $pk) {
    ?>
	<tr>
	<td class="ccm-permission-grid-name" id="ccm-permission-grid-name-<?php 
    echo $pk->getPermissionKeyID();
    ?>
"><strong><a dialog-title="<?php 
    echo $pk->getPermissionKeyDisplayName();
    ?>
" data-pkID="<?php 
    echo $pk->getPermissionKeyID();
    ?>
" data-paID="<?php 
    echo $pk->getPermissionAccessID();
    ?>
" onclick="ccm_permissionLaunchDialog(this)" href="javascript:void(0)"><?php 
    echo $pk->getPermissionKeyDisplayName();
    ?>
</a></strong></td>
	<td id="ccm-permission-grid-cell-<?php 
    echo $pk->getPermissionKeyID();
开发者ID:yakamoz-fang,项目名称:concrete,代码行数:31,代码来源:miscellaneous.php

示例13: exportList

 public static function exportList($xml)
 {
     $categories = PermissionKeyCategory::getList();
     $pxml = $xml->addChild('permissionkeys');
     foreach ($categories as $cat) {
         $permissions = PermissionKey::getList($cat->getPermissionKeyCategoryHandle());
         foreach ($permissions as $p) {
             $p->export($pxml);
         }
     }
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:11,代码来源:key.php

示例14: defined

<?php

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

<?php 
$cat = PermissionKeyCategory::getByHandle('conversation');
?>

<table class="ccm-permission-grid table table-striped">
<?php 
$cnvID = 0;
if (is_object($conversation)) {
    $cnvID = $conversation->getConversationID();
}
$permissions = PermissionKey::getList('conversation');
foreach ($permissions as $pk) {
    $pk->setPermissionObject($conversation);
    ?>
	<tr>
	<td class="ccm-permission-grid-name" id="ccm-permission-grid-name-<?php 
    echo $pk->getPermissionKeyID();
    ?>
"><strong><a dialog-title="<?php 
    echo $pk->getPermissionKeyDisplayName();
    ?>
" data-pkID="<?php 
    echo $pk->getPermissionKeyID();
    ?>
" data-paID="<?php 
    echo $pk->getPermissionAccessID();
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:31,代码来源:conversation.php

示例15: resetPermissions

	public function resetPermissions($fOverrideSetPermissions = 0) {
		$db = Loader::db();
		$db->Execute("delete from FilePermissionAssignments where fID = ?", array($this->fID));
		$db->Execute("update Files set fOverrideSetPermissions = ? where fID = ?", array($fOverrideSetPermissions, $this->fID));
		if ($fOverrideSetPermissions) {
			$permissions = PermissionKey::getList('file');
			foreach($permissions as $pk) { 
				$pk->setPermissionObject($this);
				$pk->copyFromFileSetToFile();
			}	
		}
	}
开发者ID:ronlobo,项目名称:concrete5,代码行数:12,代码来源:file.php


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