protected function createObjectDOMElement( DOMDocument $domDocument, eZContentObject $object )
    {
        $objectElement = $domDocument->createElement( 'Object' );

        // Set attributs.
        $objectElement->setAttribute( 'mainNodeID', $object->attribute( 'main_node_id' ) );
        $objectElement->setAttribute( 'initialLanguage', $object->attribute( 'initial_language_code' ) );
        $objectElement->setAttribute( 'published', $object->attribute( 'published' ) );
        $objectElement->setAttribute( 'modified', $object->attribute( 'modified' ) );

        // Add Class element.
        $objectElement->appendChild( $this->createClassDOMElement( $domDocument, $object->attribute( 'content_class' ) ) );

        // Add language list.
        $objectElement->appendChild( $this->createNameListDOMElementFromContentObject( $domDocument, $object ) );

        // Add owner element.
        $objectElement->appendChild( $this->createOwnerDOMElement( $domDocument, $object->attribute( 'owner' ) ) );

        // Add Section element.
        $objectElement->appendChild( $this->createSectionDOMElement( $domDocument, eZSection::fetch( $object->attribute( 'section_id' ) ) ) );

        return $objectElement;
    }
protected function createObjectDOMElement( DOMDocument $domDocument, eZContentObject $object )
    {
        $objectElement = $domDocument->createElement( 'Object' );

        // Set attributs.
        $objectElement->setAttribute( 'mainNodeID', $object->attribute( 'main_node_id' ) );
        $objectElement->setAttribute( 'initialLanguage', $object->attribute( 'initial_language_code' ) );
        $objectElement->setAttribute( 'published', $object->attribute( 'published' ) );
        $objectElement->setAttribute( 'modified', $object->attribute( 'modified' ) );

        // Add Class element.
        $objectElement->appendChild( $this->createClassDOMElement( $domDocument, $object->attribute( 'content_class' ) ) );

        // Add language list.
        $objectElement->appendChild( $this->createNameListDOMElementFromContentObject( $domDocument, $object ) );

        // Add owner element.
        $objectElement->appendChild( $this->createOwnerDOMElement( $domDocument, $object->attribute( 'owner' ) ) );

        // Add Section element.
        $objectElement->appendChild( $this->createSectionDOMElement( $domDocument, eZSection::fetch( $object->attribute( 'section_id' ) ) ) );

        return $objectElement;
    }
protected function createObjectDOMElement ( DOMDocument $ domDocument , eZContentObject $ object ) { $ objectElement = $ domDocument -> createElement ( 'Object' ) ; // Set attributs. $ objectElement -> setAttribute ( 'mainNodeID' , $ object -> attribute ( 'main_node_id' ) ) ; $ objectElement -> setAttribute ( 'initialLanguage' , $ object -> attribute ( 'initial_language_code' ) ) ; $ objectElement -> setAttribute ( 'published' , $ object -> attribute ( 'published' ) ) ; $ objectElement -> setAttribute ( 'modified' , $ object -> attribute ( 'modified' ) ) ; // Add Class element. $ objectElement -> appendChild ( $ this -> createClassDOMElement ( $ domDocument , $ object -> attribute ( 'content_class' ) ) ) ; // Add language list. $ objectElement -> appendChild ( $ this -> createNameListDOMElementFromContentObject ( $ domDocument , $ object ) ) ; // Add owner element. $ objectElement -> appendChild ( $ this -> createOwnerDOMElement ( $ domDocument , $ object -> attribute ( 'owner' ) ) ) ; // Add Section element. $ objectElement -> appendChild ( $ this -> createSectionDOMElement ( $ domDocument , eZSection :: fetch ( $ object -> attribute ( 'section_id' ) ) ) ) ; return $ objectElement ; }
Create Object element.

@param DOMDocument Owner DOMDocument
@param eZContentObject eZContentObject object.

@return DOMElement Object DOMDocument, example:

<Object ID="153" mainNodeID="123" initialLanguage="eng-GB" published="123213412" modified="1251231542">
<Class ID="12" primaryLanguage="eng-GB">
<NameList>
<Name locale="eng-GB">eZ Publish rocks</Name>
</NameList>
</Class>
<NameList>
<Name locale="eng-GB">eZ Publish rocks</Name>
<Name locale="nor-NO">eZ Publish rokker</Name>
</NameList>
<Owner objectID="135" primaryLanguage="nor-NO">
<NameList>
<Name locale="nor-NO">Balle Klorin</Name>
</NameList>
</Owner>
<Section ID="2" name="News" />
</Object>
Create Object element .