eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php 1 location
|
@@ 59-70 (lines=12) @@
|
| 56 |
|
* @param \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue $value |
| 57 |
|
* @param \eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue |
| 58 |
|
*/ |
| 59 |
|
public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) |
| 60 |
|
{ |
| 61 |
|
if ($value->dataInt === null) { |
| 62 |
|
return; |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
$fieldValue->data = array( |
| 66 |
|
'rfc850' => null, |
| 67 |
|
'timestamp' => $value->dataInt, |
| 68 |
|
); |
| 69 |
|
$fieldValue->sortKey = $value->sortKeyInt; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
/** |
| 73 |
|
* Converts field definition data in $fieldDef into $storageFieldDef. |
eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php 1 location
|
@@ 55-62 (lines=8) @@
|
| 52 |
|
* @param \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue $value |
| 53 |
|
* @param \eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue |
| 54 |
|
*/ |
| 55 |
|
public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) |
| 56 |
|
{ |
| 57 |
|
$fieldValue->data = array( |
| 58 |
|
'urlId' => $value->dataInt, |
| 59 |
|
'text' => $value->dataText, |
| 60 |
|
); |
| 61 |
|
$fieldValue->sortKey = false; |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
/** |
| 65 |
|
* Converts field definition data in $fieldDef into $storageFieldDef. |
eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php 1 location
|
@@ 56-67 (lines=12) @@
|
| 53 |
|
* @param \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue $value |
| 54 |
|
* @param \eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue |
| 55 |
|
*/ |
| 56 |
|
public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) |
| 57 |
|
{ |
| 58 |
|
if ($value->dataInt === null || $value->dataInt == 0) { |
| 59 |
|
return; |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
$fieldValue->data = array( |
| 63 |
|
'timestamp' => $value->dataInt, |
| 64 |
|
'rfc850' => null, |
| 65 |
|
); |
| 66 |
|
$fieldValue->sortKey = $value->sortKeyInt; |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
/** |
| 70 |
|
* Converts field definition data in $fieldDef into $storageFieldDef. |