PHP Класс eZ\Publish\Core\FieldType\BinaryBase\Type

Наследование: extends eZ\Publish\Core\FieldType\FieldType
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$validatorConfigurationSchema

Открытые методы

Метод Описание
fromHash ( mixed $hash ) : eZ\Publish\Core\FieldType\BinaryBase\Value Converts an $hash to the Value defined by the field type.
fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value Converts a persistence $fieldValue to a Value.
getName ( eZ\Publish\SPI\FieldType\Value $value ) : string Returns the name of the given field value.
isSearchable ( ) : boolean Returns whether the field type is searchable.
toHash ( eZ\Publish\SPI\FieldType\Value $value ) : mixed Converts a $Value to a hash.
toPersistenceValue ( eZ\Publish\SPI\FieldType\Value $value ) : eZ\Publish\SPI\Persistence\Content\FieldValue Converts a $value to a persistence value.
validate ( eZ\Publish\API\Repository\Values\ContentType\FieldDefinition $fieldDefinition, eZ\Publish\SPI\FieldType\Value $fieldValue ) : eZ\Publish\SPI\FieldType\ValidationError[] Validates a field based on the validators in the field definition.
validateValidatorConfiguration ( mixed $validatorConfiguration ) : eZ\Publish\SPI\FieldType\ValidationError[] Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

Защищенные методы

Метод Описание
checkValueStructure ( Value $value ) Throws an exception if value structure is not of expected format.
completeValue ( Value $value ) Attempts to complete the data in $value.
createValue ( array $inputValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value Creates a specific value of the derived class from $inputValue.
createValueFromInput ( string | array | eZ\Publish\Core\FieldType\BinaryBase\Value $inputValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value Inspects given $inputValue and potentially converts it into a dedicated value object.
getSortInfo ( Value $value ) : boolean BinaryBase does not support sorting.

Описание методов

checkValueStructure() защищенный Метод

Throws an exception if value structure is not of expected format.
protected checkValueStructure ( Value $value )
$value eZ\Publish\Core\FieldType\Value

completeValue() защищенный Метод

Attempts to complete the data in $value.
protected completeValue ( Value $value )
$value eZ\Publish\Core\FieldType\Value

createValue() абстрактный защищенный Метод

Creates a specific value of the derived class from $inputValue.
abstract protected createValue ( array $inputValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$inputValue array
Результат eZ\Publish\Core\FieldType\BinaryBase\Value

createValueFromInput() защищенный Метод

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( string | array | eZ\Publish\Core\FieldType\BinaryBase\Value $inputValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$inputValue string | array | eZ\Publish\Core\FieldType\BinaryBase\Value
Результат eZ\Publish\Core\FieldType\BinaryBase\Value The potentially converted and structurally plausible value.

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

Converts an $hash to the Value defined by the field type.
public fromHash ( mixed $hash ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$hash mixed
Результат eZ\Publish\Core\FieldType\BinaryBase\Value $value

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

This method builds a field type value from the $data and $externalData properties.
public fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Результат eZ\Publish\Core\FieldType\BinaryBase\Value

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

It will be used to generate content name and url alias if current field is designated to be used in the content name/urlAlias pattern.
public getName ( eZ\Publish\SPI\FieldType\Value $value ) : string
$value eZ\Publish\SPI\FieldType\Value
Результат string

getSortInfo() защищенный Метод

BinaryBase does not support sorting.
protected getSortInfo ( Value $value ) : boolean
$value eZ\Publish\Core\FieldType\Value
Результат boolean

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

Returns whether the field type is searchable.
public isSearchable ( ) : boolean
Результат boolean

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

Converts a $Value to a hash.
public toHash ( eZ\Publish\SPI\FieldType\Value $value ) : mixed
$value eZ\Publish\SPI\FieldType\Value
Результат mixed

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

In this method the field type puts the data which is stored in the field of content in the repository into the property FieldValue::data. The format of $data is a primitive, an array (map) or an object, which is then canonically converted to e.g. json/xml structures by future storage engines without further conversions. For mapping the $data to the legacy database an appropriate Converter (implementing eZ\Publish\Core\Persistence\Legacy\FieldValue\Converter) has implemented for the field type. Note: $data should only hold data which is actually stored in the field. It must not hold data which is stored externally. The $externalData property in the FieldValue is used for storing data externally by the FieldStorage interface method storeFieldData. The FieldValuer::sortKey is build by the field type for using by sort operations.
См. также: eZ\Publish\SPI\Persistence\Content\FieldValue
public toPersistenceValue ( eZ\Publish\SPI\FieldType\Value $value ) : eZ\Publish\SPI\Persistence\Content\FieldValue
$value eZ\Publish\SPI\FieldType\Value The value of the field type
Результат eZ\Publish\SPI\Persistence\Content\FieldValue the value processed by the storage engine

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

Validates a field based on the validators in the field definition.
public validate ( eZ\Publish\API\Repository\Values\ContentType\FieldDefinition $fieldDefinition, eZ\Publish\SPI\FieldType\Value $fieldValue ) : eZ\Publish\SPI\FieldType\ValidationError[]
$fieldDefinition eZ\Publish\API\Repository\Values\ContentType\FieldDefinition The field definition of the field
$fieldValue eZ\Publish\SPI\FieldType\Value The field value for which an action is performed
Результат eZ\Publish\SPI\FieldType\ValidationError[]

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

Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.
public validateValidatorConfiguration ( mixed $validatorConfiguration ) : eZ\Publish\SPI\FieldType\ValidationError[]
$validatorConfiguration mixed
Результат eZ\Publish\SPI\FieldType\ValidationError[]

Описание свойств

$validatorConfigurationSchema защищенное свойство

См. также: eZ\Publish\Core\FieldType::$validatorConfigurationSchema
protected $validatorConfigurationSchema