Interface

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter

interface Converter

Converter for field values in legacy storage.

Methods

toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)

Converts data from $value to $storageFieldValue.

toFieldValue(StorageFieldValue $value, FieldValue $fieldValue)

Converts data from $value to $fieldValue.

toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)

Converts field definition data in $fieldDef into $storageFieldDef.

toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)

Converts field definition data in $storageDef into $fieldDef.

string|false getIndexColumn()

Returns the name of the index column in the attribute table.

Details

at line 31
public toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)

Converts data from $value to $storageFieldValue.

Note: You should not throw on validation here, as it is implicitly used by ContentService->createContentDraft(). Rather allow invalid value or omit it to let validation layer in FieldType handle issues when user tried to publish the given draft.

Parameters

FieldValue $value
StorageFieldValue $storageFieldValue

at line 39
public toFieldValue(StorageFieldValue $value, FieldValue $fieldValue)

Converts data from $value to $fieldValue.

Parameters

StorageFieldValue $value
FieldValue $fieldValue

at line 47
public toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef)

Converts field definition data in $fieldDef into $storageFieldDef.

Parameters

FieldDefinition $fieldDef
StorageFieldDefinition $storageDef

at line 55
public toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef)

Converts field definition data in $storageDef into $fieldDef.

Parameters

StorageFieldDefinition $storageDef
FieldDefinition $fieldDef

at line 68
public string|false getIndexColumn()

Returns the name of the index column in the attribute table.

Returns the name of the index column the datatype uses, which is either "sortkeyint" or "sortkeystring". This column is then used for filtering and sorting for this type.

If the indexing is not supported, this method must return false.

Return Value

string|false