當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。