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