kernel/classes/ezcontentobjecttreenode.php
static function findMainNodeArray( $objectIDArray, $asObject = true )
    {
        if ( empty( $objectIDArray ) )
            return null;

        $db = eZDB::instance();
        $nodeListArray = $db->arrayQuery(
            "SELECT " .
            "ezcontentobject.contentclass_id, ezcontentobject.current_version, ezcontentobject.id, ezcontentobject.initial_language_id, ezcontentobject.language_mask, " .
            "ezcontentobject.modified, ezcontentobject.name, ezcontentobject.owner_id, ezcontentobject.published, ezcontentobject.remote_id AS object_remote_id, ezcontentobject.section_id, " .
            "ezcontentobject.status, ezcontentobject_tree.contentobject_is_published, ezcontentobject_tree.contentobject_version, ezcontentobject_tree.depth, ezcontentobject_tree.is_hidden, " .
            "ezcontentobject_tree.is_invisible, ezcontentobject_tree.main_node_id, ezcontentobject_tree.modified_subnode, ezcontentobject_tree.node_id, ezcontentobject_tree.parent_node_id, " .
            "ezcontentobject_tree.path_identification_string, ezcontentobject_tree.path_string, ezcontentobject_tree.priority, ezcontentobject_tree.remote_id, ezcontentobject_tree.sort_field, " .
            "ezcontentobject_tree.sort_order, ezcontentclass.serialized_name_list as class_serialized_name_list, ezcontentclass.identifier as class_identifier, ezcontentclass.is_container " .
            "FROM ezcontentobject_tree " .
            "INNER JOIN ezcontentobject ON (ezcontentobject.id = ezcontentobject_tree.contentobject_id) " .
            "INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id) " .
            "WHERE " . $db->generateSQLINStatement( $objectIDArray, 'ezcontentobject_tree.contentobject_id', false, false, 'int' ) . " AND " .
            "ezcontentobject_tree.main_node_id = ezcontentobject_tree.node_id AND " .
            "ezcontentclass.version = 0"
        );

        if ( $asObject )
        {
            return eZContentObjectTreeNode::makeObjectsArray( $nodeListArray );
        }

        return $nodeListArray;
    }
static function findMainNodeArray( $objectIDArray, $asObject = true )
    {
        if ( empty( $objectIDArray ) )
            return null;

        $db = eZDB::instance();
        $nodeListArray = $db->arrayQuery(
            "SELECT " .
            "ezcontentobject.contentclass_id, ezcontentobject.current_version, ezcontentobject.id, ezcontentobject.initial_language_id, ezcontentobject.language_mask, " .
            "ezcontentobject.modified, ezcontentobject.name, ezcontentobject.owner_id, ezcontentobject.published, ezcontentobject.remote_id AS object_remote_id, ezcontentobject.section_id, " .
            "ezcontentobject.status, ezcontentobject_tree.contentobject_is_published, ezcontentobject_tree.contentobject_version, ezcontentobject_tree.depth, ezcontentobject_tree.is_hidden, " .
            "ezcontentobject_tree.is_invisible, ezcontentobject_tree.main_node_id, ezcontentobject_tree.modified_subnode, ezcontentobject_tree.node_id, ezcontentobject_tree.parent_node_id, " .
            "ezcontentobject_tree.path_identification_string, ezcontentobject_tree.path_string, ezcontentobject_tree.priority, ezcontentobject_tree.remote_id, ezcontentobject_tree.sort_field, " .
            "ezcontentobject_tree.sort_order, ezcontentclass.serialized_name_list as class_serialized_name_list, ezcontentclass.identifier as class_identifier, ezcontentclass.is_container " .
            "FROM ezcontentobject_tree " .
            "INNER JOIN ezcontentobject ON (ezcontentobject.id = ezcontentobject_tree.contentobject_id) " .
            "INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id) " .
            "WHERE " . $db->generateSQLINStatement( $objectIDArray, 'ezcontentobject_tree.contentobject_id', false, false, 'int' ) . " AND " .
            "ezcontentobject_tree.main_node_id = ezcontentobject_tree.node_id AND " .
            "ezcontentclass.version = 0"
        );

        if ( $asObject )
        {
            return eZContentObjectTreeNode::makeObjectsArray( $nodeListArray );
        }

        return $nodeListArray;
    }
static function findMainNodeArray ( $ objectIDArray , $ asObject = true ) { if ( empty ( $ objectIDArray ) ) return null ; $ db = eZDB :: instance ( ) ; $ nodeListArray = $ db -> arrayQuery ( "SELECT " . "ezcontentobject.contentclass_id, ezcontentobject.current_version, ezcontentobject.id, ezcontentobject.initial_language_id, ezcontentobject.language_mask, " . "ezcontentobject.modified, ezcontentobject.name, ezcontentobject.owner_id, ezcontentobject.published, ezcontentobject.remote_id AS object_remote_id, ezcontentobject.section_id, " . "ezcontentobject.status, ezcontentobject_tree.contentobject_is_published, ezcontentobject_tree.contentobject_version, ezcontentobject_tree.depth, ezcontentobject_tree.is_hidden, " . "ezcontentobject_tree.is_invisible, ezcontentobject_tree.main_node_id, ezcontentobject_tree.modified_subnode, ezcontentobject_tree.node_id, ezcontentobject_tree.parent_node_id, " . "ezcontentobject_tree.path_identification_string, ezcontentobject_tree.path_string, ezcontentobject_tree.priority, ezcontentobject_tree.remote_id, ezcontentobject_tree.sort_field, " . "ezcontentobject_tree.sort_order, ezcontentclass.serialized_name_list as class_serialized_name_list, ezcontentclass.identifier as class_identifier, ezcontentclass.is_container " . "FROM ezcontentobject_tree " . "INNER JOIN ezcontentobject ON (ezcontentobject.id = ezcontentobject_tree.contentobject_id) " . "INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id) " . "WHERE " . $ db -> generateSQLINStatement ( $ objectIDArray , 'ezcontentobject_tree.contentobject_id' , false , false , 'int' ) . " AND " . "ezcontentobject_tree.main_node_id = ezcontentobject_tree.node_id AND " . "ezcontentclass.version = 0" ) ; if ( $ asObject ) { return eZContentObjectTreeNode :: makeObjectsArray ( $ nodeListArray ) ; } return $ nodeListArray ; }
Fetches the main nodes for an array of object id's
@param array(int) $objectIDArray an array of object IDs
@param bool $asObject
Wether to return the result as an array of eZContentObjectTreeNode
(true) or as an array of associative arrays (false)
@return array(array|eZContentObjectTreeNode)
Fetches the main nodes for an array of object id s