PHP Class eZ\Publish\Core\FieldType\Image\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 ) : Value Converts an $hash to the Value defined by the field type.
fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value Converts a persistence $fieldValue to a Value.
getEmptyValue ( ) : Value Returns the fallback default value of field type when no such default value is provided in the field definition in content types.
getFieldTypeIdentifier ( ) : string Returns the field type identifier for this field type.
getName ( eZ\Publish\SPI\FieldType\Value $value ) : string Returns the name of the given field value.
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.
createValueFromInput ( string | array | Value $inputValue ) : Value Inspects given $inputValue and potentially converts it into a dedicated value object.
getSortInfo ( Value $value ) : boolean

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

createValueFromInput() protected méthode

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( string | array | Value $inputValue ) : Value
$inputValue string | array | Value
Résultat 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 ) : Value
$hash mixed
Résultat Value $value

fromPersistenceValue() public méthode

Converts a persistence $fieldValue to a Value.
public fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Résultat Value

getEmptyValue() public méthode

Returns the fallback default value of field type when no such default value is provided in the field definition in content types.
public getEmptyValue ( ) : Value
Résultat Value

getFieldTypeIdentifier() public méthode

Returns the field type identifier for this field type.
public getFieldTypeIdentifier ( ) : string
Résultat string

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

See also: eZ\Publish\Core\FieldType::getSortInfo()
protected getSortInfo ( Value $value ) : boolean
$value eZ\Publish\Core\FieldType\Value
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

Converts a $value to a persistence value.
public toPersistenceValue ( eZ\Publish\SPI\FieldType\Value $value ) : eZ\Publish\SPI\Persistence\Content\FieldValue
$value eZ\Publish\SPI\FieldType\Value
Résultat eZ\Publish\SPI\Persistence\Content\FieldValue

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