PHP 클래스 eZ\Publish\Core\FieldType\RichText\Type

상속: extends eZ\Publish\Core\FieldType\FieldType
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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