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

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

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

Свойство Тип Описание
$inputConverterDispatcher ConverterDispatcher
$inputNormalizer Normalizer
$inputValidatorDispatcher null | ValidatorDispatcher
$internalFormatValidator ValidatorDispatcher
$settingsSchema array The key is the setting name, and the value is the default value for this setting

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

Метод Описание
__construct ( Validator $internalFormatValidator, ConverterDispatcher $inputConverterDispatcher, Normalizer $inputNormalizer = null, ValidatorDispatcher $inputValidatorDispatcher = null )
fromHash ( mixed $hash ) : Value Converts an $hash to the Value defined by the field type.
fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value Creates a new Value object from persistence data.
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.
getRelations ( eZ\Publish\SPI\FieldType\Value $value ) : array Returns relation data extracted from value.
isEmptyValue ( eZ\Publish\SPI\FieldType\Value $value ) : boolean Returns if the given $value is considered empty by the field type.
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
validate ( eZ\Publish\API\Repository\Values\ContentType\FieldDefinition $fieldDefinition, eZ\Publish\SPI\FieldType\Value $value ) : eZ\Publish\SPI\FieldType\ValidationError[] Validates a field based on the validators in the field definition.
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 | DOMDocument | string $inputValue ) : Value Inspects given $inputValue and potentially converts it into a dedicated value object.
getRelatedObjectIds ( Value $fieldValue, $relationType )
getSortInfo ( Value $value ) : array | boolean Returns sortKey information.
loadXMLString ( $xmlString ) : DOMDocument Creates \DOMDocument from given $xmlString.

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

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

public __construct ( Validator $internalFormatValidator, ConverterDispatcher $inputConverterDispatcher, Normalizer $inputNormalizer = null, ValidatorDispatcher $inputValidatorDispatcher = null )
$internalFormatValidator Validator
$inputConverterDispatcher ConverterDispatcher
$inputNormalizer Normalizer
$inputValidatorDispatcher ValidatorDispatcher

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 | DOMDocument | string $inputValue ) : Value
$inputValue Value | DOMDocument | string
Результат Value The potentially converted and structurally plausible value.

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

$hash accepts the following keys: - xml (XML string which complies internal format).
public fromHash ( mixed $hash ) : Value
$hash mixed
Результат Value $value

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

$fieldValue->data is supposed to be a string.
public fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Результат Value

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

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
Результат Value

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

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

protected getRelatedObjectIds ( Value $fieldValue, $relationType )
$fieldValue Value

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

Not intended for \eZ\Publish\API\Repository\Values\Content\Relation::COMMON type relations, there is a service API for handling those.
public getRelations ( eZ\Publish\SPI\FieldType\Value $value ) : array
$value eZ\Publish\SPI\FieldType\Value
Результат array Hash with relation type as key and array of destination content ids as value. Example: array( \eZ\Publish\API\Repository\Values\Content\Relation::LINK => array( "contentIds" => array( 12, 13, 14 ), "locationIds" => array( 24 ) ), \eZ\Publish\API\Repository\Values\Content\Relation::EMBED => array( "contentIds" => array( 12 ), "locationIds" => array( 24, 45 ) ), \eZ\Publish\API\Repository\Values\Content\Relation::ATTRIBUTE => array( 12 ) )

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

Returns sortKey information.
См. также: eZ\Publish\Core\FieldType
protected getSortInfo ( Value $value ) : array | boolean
$value eZ\Publish\Core\FieldType\Value
Результат array | boolean

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

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

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

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

Creates \DOMDocument from given $xmlString.
protected loadXMLString ( $xmlString ) : DOMDocument
$xmlString
Результат DOMDocument

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

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

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

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

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

This is a base implementation, returning an empty array() that indicates that no validation errors occurred. Overwrite in derived types, if validation is supported.
public validate ( eZ\Publish\API\Repository\Values\ContentType\FieldDefinition $fieldDefinition, eZ\Publish\SPI\FieldType\Value $value ) : eZ\Publish\SPI\FieldType\ValidationError[]
$fieldDefinition eZ\Publish\API\Repository\Values\ContentType\FieldDefinition The field definition of the field
$value eZ\Publish\SPI\FieldType\Value The field value for which an action is performed
Результат eZ\Publish\SPI\FieldType\ValidationError[]

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[]

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

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

protected ConverterDispatcher,eZ\Publish\Core\FieldType\RichText $inputConverterDispatcher
Результат ConverterDispatcher

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

protected Normalizer,eZ\Publish\Core\FieldType\RichText $inputNormalizer
Результат Normalizer

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

protected null|ValidatorDispatcher,eZ\Publish\Core\FieldType\RichText $inputValidatorDispatcher
Результат null | ValidatorDispatcher

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

protected ValidatorDispatcher,eZ\Publish\Core\FieldType\RichText $internalFormatValidator
Результат ValidatorDispatcher

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

The key is the setting name, and the value is the default value for this setting
protected array $settingsSchema
Результат array