本文整理匯總了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>