当前位置: 首页>>代码示例>>PHP>>正文


PHP eZContentOperationCollection::changeSortOrder方法代码示例

本文整理汇总了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');
开发者ID:heliopsis,项目名称:ezpublish-legacy,代码行数:31,代码来源:action.php


注:本文中的eZContentOperationCollection::changeSortOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。