eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter::toFieldValue PHP Method

toFieldValue() public method

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

Usage Example

 /**
  * @group fieldType
  * @group keyword
  * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter::toFieldValue
  */
 public function testToFieldValue()
 {
     $storageFieldValue = new StorageFieldValue();
     $fieldValue = new FieldValue();
     $this->converter->toFieldValue($storageFieldValue, $fieldValue);
     $this->assertSame(array(), $fieldValue->data);
     $this->assertEquals('', $fieldValue->sortKey);
 }