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

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

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

Свойство Тип Описание
$hashConverter HashConverter
$pageService PageService
$settingsSchema array

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

Метод Описание
__construct ( PageService $pageService, HashConverter $hashConverter )
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 ( ) : mixed Returns the empty value for this field type.
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.
isEmptyValue ( eZ\Publish\SPI\FieldType\Value $value ) : boolean Returns if the given $value is considered empty by the field type.
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.
validateFieldSettings ( mixed $fieldSettings ) : eZ\Publish\SPI\FieldType\ValidationError[] Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

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

Метод Описание
checkValueStructure ( Value $value ) Throws an exception if value structure is not of expected format.
createValueFromInput ( Value $inputValue ) : Value Inspects given $inputValue and potentially converts it into a dedicated value object.
getSortInfo ( Value $value ) : mixed Returns information for FieldValue->$sortKey relevant to the field type.

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

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

public __construct ( PageService $pageService, HashConverter $hashConverter )
$pageService PageService
$hashConverter HashConverter

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

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

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

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( Value $inputValue ) : Value
$inputValue Value
Результат Value The potentially converted and structurally plausible value.

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

Converts an $hash to the Value defined by the field type.
public fromHash ( mixed $hash ) : Value
$hash mixed
Результат Value

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

Converts a persistence $fieldValue to a Value.
public fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Результат Value

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

This value will be used, if no value was provided for a field of this type and no default value was specified in the field definition.
public getEmptyValue ( ) : mixed
Результат mixed

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

Returns the field type identifier for this field type.
public getFieldTypeIdentifier ( ) : string
Результат string

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() защищенный Метод

Return value is mixed. It should be something which is sensible for sorting. It is up to the persistence implementation to handle those values. Common string and integer values are safe. For the legacy storage it is up to the field converters to set this value in either sort_key_string or sort_key_int.
protected getSortInfo ( Value $value ) : mixed
$value eZ\Publish\Core\FieldType\Value
Результат mixed

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

Returns if the given $value is considered empty by the field type.
public isEmptyValue ( eZ\Publish\SPI\FieldType\Value $value ) : boolean
$value eZ\Publish\SPI\FieldType\Value
Результат 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() публичный Метод

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
Результат eZ\Publish\SPI\Persistence\Content\FieldValue

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

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

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

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

protected HashConverter,eZ\Publish\Core\FieldType\Page $hashConverter
Результат HashConverter

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

protected PageService,eZ\Publish\Core\FieldType\Page $pageService
Результат PageService

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

protected array $settingsSchema
Результат array