PHP Class eZ\Publish\Core\FieldType\BinaryBase\Type

Inheritance: extends eZ\Publish\Core\FieldType\FieldType
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$validatorConfigurationSchema

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

checkValueStructure() protected méthode

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

completeValue() protected méthode

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

createValue() abstract protected méthode

Creates a specific value of the derived class from $inputValue.
abstract protected createValue ( array $inputValue ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$inputValue array
Résultat eZ\Publish\Core\FieldType\BinaryBase\Value

createValueFromInput() protected méthode

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
Résultat eZ\Publish\Core\FieldType\BinaryBase\Value The potentially converted and structurally plausible value.

fromHash() public méthode

Converts an $hash to the Value defined by the field type.
public fromHash ( mixed $hash ) : eZ\Publish\Core\FieldType\BinaryBase\Value
$hash mixed
Résultat eZ\Publish\Core\FieldType\BinaryBase\Value $value

fromPersistenceValue() public méthode

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
Résultat eZ\Publish\Core\FieldType\BinaryBase\Value

getName() public méthode

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
Résultat string

getSortInfo() protected méthode

BinaryBase does not support sorting.
protected getSortInfo ( Value $value ) : boolean
$value eZ\Publish\Core\FieldType\Value
Résultat boolean

isSearchable() public méthode

Returns whether the field type is searchable.
public isSearchable ( ) : boolean
Résultat boolean

toHash() public méthode

Converts a $Value to a hash.
public toHash ( eZ\Publish\SPI\FieldType\Value $value ) : mixed
$value eZ\Publish\SPI\FieldType\Value
Résultat mixed

toPersistenceValue() public méthode

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.
See also: 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
Résultat eZ\Publish\SPI\Persistence\Content\FieldValue the value processed by the storage engine

validate() public méthode

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
Résultat eZ\Publish\SPI\FieldType\ValidationError[]

validateValidatorConfiguration() public méthode

Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.
public validateValidatorConfiguration ( mixed $validatorConfiguration ) : eZ\Publish\SPI\FieldType\ValidationError[]
$validatorConfiguration mixed
Résultat eZ\Publish\SPI\FieldType\ValidationError[]

Property Details

$validatorConfigurationSchema protected_oe property

See also: eZ\Publish\Core\FieldType::$validatorConfigurationSchema
protected $validatorConfigurationSchema