PHP Class eZ\Publish\Core\FieldType\DateAndTime\Type

Inheritance: extends eZ\Publish\Core\FieldType\FieldType
Mostrar archivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$settingsSchema

Public Methods

Method Description
fieldSettingsFromHash ( array | hash | scalar | null $fieldSettingsHash ) : mixed Converts the given $fieldSettingsHash to field settings of the type.
fieldSettingsToHash ( mixed $fieldSettings ) : array | hash | scalar | null Converts the given $fieldSettings to a simple hash format.
fromHash ( mixed $hash ) : Value Converts an $hash to the Value defined by the field type.
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.
isSearchable ( ) : boolean Returns whether the field type is searchable.
toHash ( eZ\Publish\SPI\FieldType\Value $value ) : mixed Converts a $Value to a hash.
validateFieldSettings ( mixed $fieldSettings ) : eZ\Publish\SPI\FieldType\ValidationError[] Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

Protected Methods

Method Description
checkValueStructure ( Value $value ) Throws an exception if value structure is not of expected format.
createValueFromInput ( string | integer | DateTim\DateTime | 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.

Method Details

checkValueStructure() protected method

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

createValueFromInput() protected method

Inspects given $inputValue and potentially converts it into a dedicated value object.
protected createValueFromInput ( string | integer | DateTim\DateTime | Value $inputValue ) : Value
$inputValue string | integer | DateTim\DateTime | Value
return Value The potentially converted and structurally plausible value.

fieldSettingsFromHash() public method

This is the reverse operation of {@link fieldSettingsToHash()}. This is the default implementation, which just returns the given $fieldSettingsHash, assuming the supported field settings are already in a hash format. Overwrite this in your specific implementation, if necessary.
public fieldSettingsFromHash ( array | hash | scalar | null $fieldSettingsHash ) : mixed
$fieldSettingsHash array | hash | scalar | null
return mixed

fieldSettingsToHash() public method

This is the default implementation, which just returns the given $fieldSettings, assuming they are already in a hash format. Overwrite this in your specific implementation, if necessary.
public fieldSettingsToHash ( mixed $fieldSettings ) : array | hash | scalar | null
$fieldSettings mixed
return array | hash | scalar | null

fromHash() public method

Converts an $hash to the Value defined by the field type.
public fromHash ( mixed $hash ) : Value
$hash mixed Null or associative array containing timestamp and optionally date in RFC850 format.
return Value $value

getEmptyValue() public method

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
return Value

getFieldTypeIdentifier() public method

Returns the field type identifier for this field type.
public getFieldTypeIdentifier ( ) : string
return string

getName() public method

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
return string

getSortInfo() protected method

Returns information for FieldValue->$sortKey relevant to the field type.
protected getSortInfo ( Value $value ) : array
$value eZ\Publish\Core\FieldType\Value
return array

isSearchable() public method

Returns whether the field type is searchable.
public isSearchable ( ) : boolean
return boolean

toHash() public method

Converts a $Value to a hash.
public toHash ( eZ\Publish\SPI\FieldType\Value $value ) : mixed
$value eZ\Publish\SPI\FieldType\Value
return mixed

validateFieldSettings() public method

Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.
public validateFieldSettings ( mixed $fieldSettings ) : eZ\Publish\SPI\FieldType\ValidationError[]
$fieldSettings mixed
return eZ\Publish\SPI\FieldType\ValidationError[]

Property Details

$settingsSchema protected_oe property

protected $settingsSchema