本文整理汇总了PHP中PermissionsManager::getCollectionMetadata方法的典型用法代码示例。如果您正苦于以下问题:PHP PermissionsManager::getCollectionMetadata方法的具体用法?PHP PermissionsManager::getCollectionMetadata怎么用?PHP PermissionsManager::getCollectionMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PermissionsManager
的用法示例。
在下文中一共展示了PermissionsManager::getCollectionMetadata方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
elseif($rightType == 'editor'){
$userRight = 'CollEditor-'.$collId;
}
elseif($rightType == 'rare'){
$userRight = 'RareSppReader-'.$collId;
}
$permManager->addPermission($_POST['uid'],$userRight);
*/
} elseif ($action == 'Add Identification Editor') {
$identEditor = $_POST['identeditor'];
$pTokens = explode(':', $identEditor);
$permManager->addPermission($pTokens[0], 'CollTaxon', $collId, $pTokens[1]);
//$permManager->addPermission($pTokens[0],'CollTaxon-'.$collId.':'.$pTokens[1]);
}
}
$collMetadata = current($permManager->getCollectionMetadata($collId));
$isGenObs = 0;
if ($collMetadata['colltype'] == 'General Observations') {
$isGenObs = 1;
}
?>
<html>
<head>
<title><?php
echo $collMetadata['collectionname'];
?>
Collection Permissions</title>
<link href="../../css/base.css?<?php
echo $CSS_VERSION;
?>
" type="text/css" rel="stylesheet" />
示例2:
<?php
} else {
$showRareSppOption = false;
}
if (!array_key_exists("RareSppReadAll", $userPermissions)) {
?>
<div style="margin-left:5px;">
<input type='checkbox' name='p[]' value='RareSppReadAll' />
Can read Rare Species data for all collections
</div>
<?php
} else {
$showRareSppOption = false;
}
//Collection projects
$collArr = $userManager->getCollectionMetadata(0, 'specimens');
$obserArr = $userManager->getCollectionMetadata(0, 'observations');
if (array_key_exists("CollAdmin", $userPermissions)) {
$collArr = array_diff_key($collArr, $userPermissions["CollAdmin"]);
$obserArr = array_diff_key($obserArr, $userPermissions["CollAdmin"]);
}
if ($collArr) {
?>
<div style="float:right;margin:10px;">
<input type='submit' name='apsubmit' value='Add Permission' />
</div>
<h3>Specimen Collections</h3>
<table>
<tr>
<th>Admin</th>
<th>Editor</th>