eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\RichTextConverter::toStorageValue PHP Method

toStorageValue() public method

Converts data from $value to $storageFieldValue.
public toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue )
$value eZ\Publish\SPI\Persistence\Content\FieldValue
$storageFieldValue eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
    public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)
    {
        $storageFieldValue->dataText = $value->data;
    }

Usage Example

 /**
  * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\RichTextConverter::toStorageValue
  */
 public function testToStorageValue()
 {
     $value = new FieldValue();
     $value->data = $this->docbookString;
     $storageFieldValue = new StorageFieldValue();
     $this->converter->toStorageValue($value, $storageFieldValue);
     self::assertSame($this->docbookString, $storageFieldValue->dataText);
 }