本文整理汇总了PHP中eZContentObjectStateGroup::definition方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObjectStateGroup::definition方法的具体用法?PHP eZContentObjectStateGroup::definition怎么用?PHP eZContentObjectStateGroup::definition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObjectStateGroup
的用法示例。
在下文中一共展示了eZContentObjectStateGroup::definition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeByID
/**
*
*
* @param integer $id
*/
public static function removeByID($id)
{
$db = eZDB::instance();
$db->begin();
$states = eZContentObjectState::fetchByGroup($id);
foreach ($states as $state) {
eZContentObjectState::removeByID($state->attribute('id'));
}
eZPersistentObject::removeObject(eZContentObjectStateGroupLanguage::definition(), array('contentobject_state_group_id' => $id));
eZPersistentObject::removeObject(eZContentObjectStateGroup::definition(), array('id' => $id));
$db->commit();
}
示例2: foreach
default:
$limit = 10;
break;
}
$languages = eZContentLanguage::fetchList();
$tpl = eZTemplate::factory();
eZDebug::writeDebug($Module->currentAction());
if ($Module->isCurrentAction('Remove') && $Module->hasActionParameter('RemoveIDList')) {
$removeIDList = $Module->actionParameter('RemoveIDList');
foreach ($removeIDList as $removeID) {
$group = eZContentObjectStateGroup::fetchById($removeID);
if ($group && !$group->isInternal()) {
eZContentObjectStateGroup::removeByID($removeID);
}
}
} else {
if ($Module->isCurrentAction('Create')) {
return $Module->redirectTo('state/group_edit');
}
}
$groups = eZContentObjectStateGroup::fetchByOffset($limit, $offset);
$groupCount = eZPersistentObject::count(eZContentObjectStateGroup::definition());
$viewParameters = array('offset' => $offset);
$tpl->setVariable('limit', $limit);
$tpl->setVariable('list_limit_preference_name', $listLimitPreferenceName);
$tpl->setVariable('list_limit_preference_value', $listLimitPreferenceValue);
$tpl->setVariable('groups', $groups);
$tpl->setVariable('group_count', $groupCount);
$tpl->setVariable('view_parameters', $viewParameters);
$tpl->setVariable('languages', $languages);
$Result = array('content' => $tpl->fetch('design:state/groups.tpl'), 'path' => array(array('url' => false, 'text' => ezpI18n::tr('kernel/state', 'State')), array('url' => false, 'text' => ezpI18n::tr('kernel/state', 'Groups'))));