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

This field type represents a simple string.
Наследование: extends eZ\Publish\Core\FieldType\FieldType
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

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

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

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 ( string | Value $inputValue ) : Value
$inputValue string | 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 $value

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

This method builds a field type value from the $data and $externalData properties.
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

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

Returns information for FieldValue->$sortKey relevant to the field type.
protected getSortInfo ( Value $value ) : array
$value eZ\Publish\Core\FieldType\Value
Результат array

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

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

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

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.
См. также: 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
Результат eZ\Publish\SPI\Persistence\Content\FieldValue the value processed by the storage engine