public toFieldValue ( |
||
$value | ||
$fieldValue | eZ\Publish\SPI\Persistence\Content\FieldValue |
public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue)
{
$fieldValue->data = $value->dataText === null ? null : $this->restoreValueFromXmlString($value->dataText);
}
/** * Test converting XML to Parts\Page. */ public function testToFieldValue() { $storageFieldValue = new StorageFieldValue(array('dataText' => self::PAGE_XML_REFERENCE)); $fieldValue = new FieldValue(); $this->converter->toFieldValue($storageFieldValue, $fieldValue); $this->assertInstanceOf('eZ\\Publish\\Core\\FieldType\\Page\\Parts\\Page', $fieldValue->data); $this->assertEquals($this->pageReference, $fieldValue->data); }