Class

eZ\Publish\Core\FieldType\Keyword\KeywordStorage

class KeywordStorage extends GatewayBasedStorage

Converter for Keyword field type external storage.

The keyword storage ships a list (array) of keywords in $field->value->externalData. $field->value->data is simply empty, because no internal data is store.

Methods

__construct(StorageGateway $gateway)

from GatewayBasedStorage
null|bool copyLegacyField(VersionInfo $versionInfo, Field $field, Field $originalField, array $context)

This method is used exclusively by Legacy Storage to copy external data of existing field in main language to the untranslatable field not passed in create or update struct, but created implicitly in storage layer.

from GatewayBasedStorage
mixed storeFieldData(VersionInfo $versionInfo, Field $field, array $context)

getFieldData(VersionInfo $versionInfo, Field $field, array $context)

Populates $field value property based on the external data.

bool deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context)

bool hasFieldData()

Checks if field type has external data to deal with.

Field[]|null getIndexData(VersionInfo $versionInfo, Field $field, array $context)

Details

in GatewayBasedStorage at line 29
public __construct(StorageGateway $gateway)

Parameters

StorageGateway $gateway

in GatewayBasedStorage at line 48
public null|bool copyLegacyField(VersionInfo $versionInfo, Field $field, Field $originalField, array $context)

This method is used exclusively by Legacy Storage to copy external data of existing field in main language to the untranslatable field not passed in create or update struct, but created implicitly in storage layer.

By default the method falls back to the {@link \eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData()}. External storages implement this method as needed.

Parameters

VersionInfo $versionInfo
Field $field
Field $originalField
array $context

Return Value

null|bool Same as {@link \eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData()}.

at line 36
public mixed storeFieldData(VersionInfo $versionInfo, Field $field, array $context)

Parameters

VersionInfo $versionInfo
Field $field
array $context

Return Value

mixed null|true

See also

\eZ\Publish\SPI\FieldType\FieldStorage

at line 52
public getFieldData(VersionInfo $versionInfo, Field $field, array $context)

Populates $field value property based on the external data.

$field->value is a {@link eZ\Publish\SPI\Persistence\Content\FieldValue} object. This value holds the data as a {@link eZ\Publish\Core\FieldType\Value} based object, according to the field type (e.g. for TextLine, it will be a {@link eZ\Publish\Core\FieldType\TextLine\Value} object).

Parameters

VersionInfo $versionInfo
Field $field
array $context

at line 65
public bool deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context)

Parameters

VersionInfo $versionInfo
array $fieldIds Array of field IDs
array $context

Return Value

bool

at line 87
public bool hasFieldData()

Checks if field type has external data to deal with.

Return Value

bool

at line 98
public Field[]|null getIndexData(VersionInfo $versionInfo, Field $field, array $context)

Parameters

VersionInfo $versionInfo
Field $field
array $context

Return Value

Field[]|null