本文整理汇总了PHP中eZContentOperationCollection::changeSortOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentOperationCollection::changeSortOrder方法的具体用法?PHP eZContentOperationCollection::changeSortOrder怎么用?PHP eZContentOperationCollection::changeSortOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentOperationCollection
的用法示例。
在下文中一共展示了eZContentOperationCollection::changeSortOrder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
eZContentBrowse::browse(array('action_name' => 'NewObjectAddNodeAssignment', 'description_template' => 'design:content/browse_first_placement.tpl', 'keys' => array('class' => $class->attribute('id'), 'classgroup' => $class->attribute('ingroup_id_list')), 'persistent_data' => array('ClassID' => $class->attribute('id'), 'ContentLanguageCode' => $languageCode), 'content' => array('class_id' => $class->attribute('id')), 'cancel_page' => $module->redirectionURIForModule($module, 'view', array('full', 2)), 'from_page' => "/content/action"), $module);
}
}
} else {
if ($http->hasPostVariable('SetSorting') && $http->hasPostVariable('ContentObjectID') && $http->hasPostVariable('ContentNodeID') && $http->hasPostVariable('SortingField') && $http->hasPostVariable('SortingOrder')) {
$nodeID = $http->postVariable('ContentNodeID');
$contentObjectID = $http->postVariable('ContentObjectID');
$sortingField = $http->postVariable('SortingField');
$sortingOrder = $http->postVariable('SortingOrder');
$node = eZContentObjectTreeNode::fetch($nodeID);
$contentObject = eZContentObject::fetch($contentObjectID);
if (eZOperationHandler::operationIsAvailable('content_sort')) {
$operationResult = eZOperationHandler::execute('content', 'sort', array('node_id' => $nodeID, 'sorting_field' => $sortingField, 'sorting_order' => $sortingOrder), null, true);
} else {
eZContentOperationCollection::changeSortOrder($nodeID, $sortingField, $sortingOrder);
}
if ($http->hasPostVariable('RedirectURIAfterSorting')) {
return $module->redirectTo($http->postVariable('RedirectURIAfterSorting'));
}
return $module->redirectToView('view', array('full', $nodeID, $languageCode));
} else {
if ($module->isCurrentAction('MoveNode')) {
/* This action is used through the admin interface with the "Move" button,
* or in the pop-up menu and will move a node to a different location. */
if (!$module->hasActionParameter('NodeID')) {
eZDebug::writeError("Missing NodeID parameter for action " . $module->currentAction(), 'content/action');
return $module->redirectToView('view', array('full', 2));
}
if ($module->hasActionParameter('NewParentNode')) {
$selectedNodeID = $module->actionParameter('NewParentNode');