toStorageValue() публичный Метод

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
Пример #1
0
 /**
  * @covers \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateConverter::toStorageValue
  */
 public function testToStorageValue()
 {
     $value = new FieldValue();
     $value->data = array('timestamp' => $this->date->getTimestamp(), 'rfc850' => $this->date->format(\DateTime::RFC850));
     $value->sortKey = $this->date->getTimestamp();
     $storageFieldValue = new StorageFieldValue();
     $this->converter->toStorageValue($value, $storageFieldValue);
     self::assertSame($value->data['timestamp'], $storageFieldValue->dataInt);
     self::assertSame($value->sortKey, $storageFieldValue->sortKeyInt);
     self::assertSame('', $storageFieldValue->sortKeyString);
 }