public function unserializeContentObjectAttribute($package, $objectAttribute, $attributeNode)
    {
        $xmlString = $attributeNode->getElementsByTagName('rich-text-xml')->item(0)->textContent;

        $value = new DOMDocument();
        $value->loadXML($xmlString);

        $this->transformRemoteLinksToLinks($value);

        try {
            $value = $this->fieldType->acceptValue($value);
        } catch (InvalidArgumentException $e) {
            return;
        }

        $errors = $this->fieldType->validate(new FieldDefinition(), $value);
        if (!empty($errors)) {
            return;
        }

        $objectAttribute->setContent($value);
    }
public function unserializeContentObjectAttribute($package, $objectAttribute, $attributeNode)
    {
        $xmlString = $attributeNode->getElementsByTagName('rich-text-xml')->item(0)->textContent;

        $value = new DOMDocument();
        $value->loadXML($xmlString);

        $this->transformRemoteLinksToLinks($value);

        try {
            $value = $this->fieldType->acceptValue($value);
        } catch (InvalidArgumentException $e) {
            return;
        }

        $errors = $this->fieldType->validate(new FieldDefinition(), $value);
        if (!empty($errors)) {
            return;
        }

        $objectAttribute->setContent($value);
    }
public function unserializeContentObjectAttribute ( $ package , $ objectAttribute , $ attributeNode ) { $ xmlString = $ attributeNode -> getElementsByTagName ( 'rich-text-xml' ) -> item ( 0 ) -> textContent ; $ value = new DOMDocument ( ) ; $ value -> loadXML ( $ xmlString ) ; $ this -> transformRemoteLinksToLinks ( $ value ) ; try { $ value = $ this -> fieldType -> acceptValue ( $ value ) ; } catch ( InvalidArgumentException $ e ) { return ; } $ errors = $ this -> fieldType -> validate ( new FieldDefinition ( ) , $ value ) ; if ( ! empty ( $ errors ) ) { return ; } $ objectAttribute -> setContent ( $ value ) ; }
Unserializes the content object attribute from provided DOM node.

@param eZPackage $package
@param eZContentObjectAttribute $objectAttribute
@param DOMElement $attributeNode
Unserializes the content object attribute from provided DOM node .