Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

KeywordConverter.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter;
8
9 use eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter;
10 use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue;
11 use eZ\Publish\SPI\Persistence\Content\FieldValue;
12 use eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition;
13 use eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition;
14
15 class KeywordConverter implements Converter
16 {
26 public static function create()
27 {
28 return new self();
29 }
30
37 public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)
38 {
39 $storageFieldValue->sortKeyString = $value->sortKey;
40 }
41
48 public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue)
49 {
50 $fieldValue->data = [];
51 $fieldValue->sortKey = $value->sortKeyString;
52 }
53
60 public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)
61 {
62 }
63
70 public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
71 {
72 }
73
83 public function getIndexColumn()
84 {
85 return 'sort_key_string';
86 }
87 }
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter
Definition: KeywordConverter.php:16
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\toFieldValue
toFieldValue(StorageFieldValue $value, FieldValue $fieldValue)
Converts data from $value to $fieldValue.
Definition: KeywordConverter.php:48
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\toFieldDefinition
toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)
Converts field definition data in $storageDef into $fieldDef.
Definition: KeywordConverter.php:70
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\toStorageFieldDefinition
toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)
Converts field definition data in $fieldDef into $storageFieldDef.
Definition: KeywordConverter.php:60
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\toStorageValue
toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)
Converts data from $value to $storageFieldValue.
Definition: KeywordConverter.php:37
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\create
static create()
Factory for current class.
Definition: KeywordConverter.php:26
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter\getIndexColumn
getIndexColumn()
Returns the name of the index column in the attribute table.
Definition: KeywordConverter.php:83
eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
Definition: StorageFieldDefinition.php:12
eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
Definition: StorageFieldValue.php:12
eZ\Publish\SPI\Persistence\Content\FieldValue
Definition: FieldValue.php:12
eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
Definition: SPI/Persistence/Content/Type/FieldDefinition.php:18
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
Converter for field values in legacy storage.
Definition: Persistence/Legacy/Content/FieldValue/Converter.php:18
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
Definition: AuthorConverter.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.