本文整理匯總了PHP中eZPackage::fetchMaintainerRoleIDList方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZPackage::fetchMaintainerRoleIDList方法的具體用法?PHP eZPackage::fetchMaintainerRoleIDList怎麽用?PHP eZPackage::fetchMaintainerRoleIDList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZPackage
的用法示例。
在下文中一共展示了eZPackage::fetchMaintainerRoleIDList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: checkPackageMaintainer
function checkPackageMaintainer($package, &$persistentData)
{
$roleList = eZPackage::fetchMaintainerRoleIDList($this->packageType($package, $persistentData), true);
if (count($roleList) > 0) {
if ($package instanceof eZPackage) {
$maintainerPerson = false;
$user = eZUser::currentUser();
$userObject = $user->attribute('contentobject');
if ($userObject) {
$maintainerPerson = $userObject->attribute('name');
}
$maintainers = $package->attribute('maintainers');
foreach ($maintainers as $maintainer) {
if ($maintainer['person'] == $maintainerPerson) {
return false;
}
}
}
return true;
}
return false;
}
示例2: fetchMaintainerRoleList
static function fetchMaintainerRoleList($packageType = false, $checkRoles = false)
{
$roleList = eZPackage::fetchMaintainerRoleIDList($packageType, $checkRoles);
$roleNameList = array();
foreach ($roleList as $roleID) {
$roleName = eZPackage::maintainerRoleName($roleID);
$roleNameList[] = array('name' => $roleName, 'id' => $roleID);
}
return $roleNameList;
}