kernel/content/ezcontentoperationcollection.php
static public function updatePriority( $parentNodeID, $priorityArray = array(), $priorityIDArray = array() )
    {
        $curNode = eZContentObjectTreeNode::fetch( $parentNodeID );
        if ( $curNode instanceof eZContentObjectTreeNode )
        {
             $objectIDs = array();
             $db = eZDB::instance();
             $db->begin();
             for ( $i = 0, $l = count( $priorityArray ); $i < $l; $i++ )
             {
                 $priority = (int) $priorityArray[$i];
                 $nodeID = (int) $priorityIDArray[$i];
                 $node = eZContentObjectTreeNode::fetch( $nodeID );
                 if ( !$node instanceof eZContentObjectTreeNode )
                 {
                     continue;
                 }

                 $objectIDs[] = $node->attribute( 'contentobject_id' );
                 $db->query( "UPDATE
                                  ezcontentobject_tree
                              SET
                                  priority={$priority}
                              WHERE
                                  node_id={$nodeID} AND parent_node_id={$parentNodeID}" );
             }
             $curNode->updateAndStoreModified();
             $db->commit();
             if ( !eZSearch::getEngine() instanceof eZSearchEngine )
             {
                 eZContentCacheManager::clearContentCacheIfNeeded( $objectIDs );
                 foreach ( $objectIDs as $objectID )
                 {
                     eZContentOperationCollection::registerSearchObject( $objectID );
                 }
             }
        }
        return array( 'status' => true );
    }
static public function updatePriority( $parentNodeID, $priorityArray = array(), $priorityIDArray = array() )
    {
        $curNode = eZContentObjectTreeNode::fetch( $parentNodeID );
        if ( $curNode instanceof eZContentObjectTreeNode )
        {
             $objectIDs = array();
             $db = eZDB::instance();
             $db->begin();
             for ( $i = 0, $l = count( $priorityArray ); $i < $l; $i++ )
             {
                 $priority = (int) $priorityArray[$i];
                 $nodeID = (int) $priorityIDArray[$i];
                 $node = eZContentObjectTreeNode::fetch( $nodeID );
                 if ( !$node instanceof eZContentObjectTreeNode )
                 {
                     continue;
                 }

                 $objectIDs[] = $node->attribute( 'contentobject_id' );
                 $db->query( "UPDATE
                                  ezcontentobject_tree
                              SET
                                  priority={$priority}
                              WHERE
                                  node_id={$nodeID} AND parent_node_id={$parentNodeID}" );
             }
             $curNode->updateAndStoreModified();
             $db->commit();
             if ( !eZSearch::getEngine() instanceof eZSearchEngine )
             {
                 eZContentCacheManager::clearContentCacheIfNeeded( $objectIDs );
                 foreach ( $objectIDs as $objectID )
                 {
                     eZContentOperationCollection::registerSearchObject( $objectID );
                 }
             }
        }
        return array( 'status' => true );
    }
static public function updatePriority ( $ parentNodeID , $ priorityArray = array ( ) , $ priorityIDArray = array ( ) ) { $ curNode = eZContentObjectTreeNode :: fetch ( $ parentNodeID ) ; if ( $ curNode instanceof eZContentObjectTreeNode ) { $ objectIDs = array ( ) ; $ db = eZDB :: instance ( ) ; $ db -> begin ( ) ; for ( $ i = 0 , $ l = count ( $ priorityArray ) ; $ i < $ l ; $ i ++ ) { $ priority = ( int ) $ priorityArray [ $ i ] ; $ nodeID = ( int ) $ priorityIDArray [ $ i ] ; $ node = eZContentObjectTreeNode :: fetch ( $ nodeID ) ; if ( ! $ node instanceof eZContentObjectTreeNode ) { continue ; } $ objectIDs [ ] = $ node -> attribute ( 'contentobject_id' ) ; $ db -> query ( "UPDATE
                                  ezcontentobject_tree
                              SET
                                  priority={$priority}
                              WHERE
                                  node_id={$nodeID} AND parent_node_id={$parentNodeID}" ) ; } $ curNode -> updateAndStoreModified ( ) ; $ db -> commit ( ) ; if ( ! eZSearch :: getEngine ( ) instanceof eZSearchEngine ) { eZContentCacheManager :: clearContentCacheIfNeeded ( $ objectIDs ) ; foreach ( $ objectIDs as $ objectID ) { eZContentOperationCollection :: registerSearchObject ( $ objectID ) ; } } } return array ( 'status' => true ) ; }
Updates the priority of a node

@param int $parentNodeID
@param array $priorityArray
@param array $priorityIDArray

@return array An array with operation status, always true
Updates the priority of a node