protected function createTreeNodeDOMElement( DOMDocument $domDocument, eZContentObjectTreeNode $node )
    {
        $nodeElement = $domDocument->createElement( 'Node' );

        // Set attributes.
        $nodeElement->setAttribute( 'nodeID', $node->attribute( 'node_id' ) );
        $nodeElement->setAttribute( 'parentID', $node->attribute( 'parent_node_id' ) );

        // Get child information.
        $conditions = array( 'Depth' => 1,
                             'DepthOperator' => 'eq' );
        $nodeElement->setAttribute( 'childCount', eZContentObjectTreeNode::subTreeCountByNodeID( $conditions, $node->attribute( 'node_id' ) ) );

        // Get child information for tree structure.
        $conditions['ClassFilterType'] = 'include';
        $conditions['ClassFilterArray'] = eZINI::instance( 'contentstructuremenu.ini' )->variable( 'TreeMenu', 'ShowClasses' );
        $nodeElement->setAttribute( 'childMenuCount', eZContentObjectTreeNode::subTreeCountByNodeID( $conditions, $node->attribute( 'node_id' ) ) );

        // Get access rights element.
        $nodeElement->appendChild( $this->createAccessDOMElement( $domDocument, $node ) );

        // Get object element.
        $nodeElement->appendChild( $this->createObjectDOMElement( $domDocument, $node->attribute( 'object' ) ) );

        return $nodeElement;
    }
protected function createTreeNodeDOMElement( DOMDocument $domDocument, eZContentObjectTreeNode $node )
    {
        $nodeElement = $domDocument->createElement( 'Node' );

        // Set attributes.
        $nodeElement->setAttribute( 'nodeID', $node->attribute( 'node_id' ) );
        $nodeElement->setAttribute( 'parentID', $node->attribute( 'parent_node_id' ) );

        // Get child information.
        $conditions = array( 'Depth' => 1,
                             'DepthOperator' => 'eq' );
        $nodeElement->setAttribute( 'childCount', eZContentObjectTreeNode::subTreeCountByNodeID( $conditions, $node->attribute( 'node_id' ) ) );

        // Get child information for tree structure.
        $conditions['ClassFilterType'] = 'include';
        $conditions['ClassFilterArray'] = eZINI::instance( 'contentstructuremenu.ini' )->variable( 'TreeMenu', 'ShowClasses' );
        $nodeElement->setAttribute( 'childMenuCount', eZContentObjectTreeNode::subTreeCountByNodeID( $conditions, $node->attribute( 'node_id' ) ) );

        // Get access rights element.
        $nodeElement->appendChild( $this->createAccessDOMElement( $domDocument, $node ) );

        // Get object element.
        $nodeElement->appendChild( $this->createObjectDOMElement( $domDocument, $node->attribute( 'object' ) ) );

        return $nodeElement;
    }
protected function createTreeNodeDOMElement ( DOMDocument $ domDocument , eZContentObjectTreeNode $ node ) { $ nodeElement = $ domDocument -> createElement ( 'Node' ) ; // Set attributes. $ nodeElement -> setAttribute ( 'nodeID' , $ node -> attribute ( 'node_id' ) ) ; $ nodeElement -> setAttribute ( 'parentID' , $ node -> attribute ( 'parent_node_id' ) ) ; // Get child information. $ conditions = array ( 'Depth' => 1 , 'DepthOperator' => 'eq' ) ; $ nodeElement -> setAttribute ( 'childCount' , eZContentObjectTreeNode :: subTreeCountByNodeID ( $ conditions , $ node -> attribute ( 'node_id' ) ) ) ; // Get child information for tree structure. $ conditions [ 'ClassFilterType' ] = 'include' ; $ conditions [ 'ClassFilterArray' ] = eZINI :: instance ( 'contentstructuremenu.ini' ) -> variable ( 'TreeMenu' , 'ShowClasses' ) ; $ nodeElement -> setAttribute ( 'childMenuCount' , eZContentObjectTreeNode :: subTreeCountByNodeID ( $ conditions , $ node -> attribute ( 'node_id' ) ) ) ; // Get access rights element. $ nodeElement -> appendChild ( $ this -> createAccessDOMElement ( $ domDocument , $ node ) ) ; // Get object element. $ nodeElement -> appendChild ( $ this -> createObjectDOMElement ( $ domDocument , $ node -> attribute ( 'object' ) ) ) ; return $ nodeElement ; }
Create Node element

@param DOMDocument Owner DOMDocument
@param eZContentObject eZContentObject node.

@return DOMElement Node DOMDocument.
Create Node element