本文整理汇总了PHP中eZRole::fetchList方法的典型用法代码示例。如果您正苦于以下问题:PHP eZRole::fetchList方法的具体用法?PHP eZRole::fetchList怎么用?PHP eZRole::fetchList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZRole
的用法示例。
在下文中一共展示了eZRole::fetchList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->eZDataType(self::DATA_TYPE_STRING, ezpI18n::tr('extension/nxc_captcha', 'NXC Captcha'), array('serialize_supported' => true, 'object_serialize_map' => array('data_text' => 'captcha_code', 'data_int' => 'checked')));
if (count(self::$definition['type']['possible_values']) === 0) {
self::$definition['type']['possible_values'] = array(self::TYPE_ALPHABETIC => ezpI18n::tr('extension/nxc_captcha', 'Alphabetic'), self::TYPE_NUMERIC => ezpI18n::tr('extension/nxc_captcha', 'Numeric'), self::TYPE_ALPHANUMERIC => ezpI18n::tr('extension/nxc_captcha', 'Alphanumeric'));
}
if (count(self::$definition['skip_role_ids']['possible_values']) === 0) {
$roles = eZRole::fetchList();
foreach ($roles as $role) {
self::$definition['skip_role_ids']['possible_values'][$role->attribute('id')] = $role->attribute('name');
}
}
}
示例2: foreach
}
// Redirect to content node browse in the user tree
// Assign the role for a user or group
if ($Module->isCurrentAction('AssignRole')) {
$selectedObjectIDArray = eZContentBrowse::result('AssignRole');
foreach ($selectedObjectIDArray as $objectID) {
$role->assignToUser($objectID);
}
// Clear role caches.
eZRole::expireCache();
// Clear all content cache.
eZContentCacheManager::clearAllContentCache();
}
if ($http->hasPostVariable('NewButton')) {
$role = eZRole::createNew();
return $Module->redirectToView('edit', array($role->attribute('id')));
}
$viewParameters = array('offset' => $offset);
$tpl = eZTemplate::factory();
$roles = eZRole::fetchByOffset($offset, $limit, $asObject = true, $ignoreTemp = true);
$roleCount = eZRole::roleCount();
$tempRoles = eZRole::fetchList($temporaryVersions = true);
$tpl->setVariable('roles', $roles);
$tpl->setVariable('role_count', $roleCount);
$tpl->setVariable('temp_roles', $tempRoles);
$tpl->setVariable('module', $Module);
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('limit', $limit);
$Result = array();
$Result['content'] = $tpl->fetch('design:role/list.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('kernel/role', 'Role list')));
示例3: removeTemporary
static function removeTemporary()
{
$temporaryRoles = eZRole::fetchList(true);
$db = eZDB::instance();
$db->begin();
foreach ($temporaryRoles as $role) {
$role->removeThis();
}
$db->commit();
}