eZPublishCommunityProject  2013.4
eZ\Publish\Core\FieldType\Media\Type Class Reference

The TextLine field type. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\Media\Type:
+ Collaboration diagram for eZ\Publish\Core\FieldType\Media\Type:

Public Member Functions

 fromPersistenceValue (FieldValue $fieldValue)
 Converts a persistence $fieldValue to a Value. More...
 
 getEmptyValue ()
 Returns the fallback default value of field type when no such default value is provided in the field definition in content types. More...
 
 getFieldTypeIdentifier ()
 Returns the field type identifier for this field type. More...
 
 toHash ($value)
 Converts a $Value to a hash. More...
 
 validateFieldSettings ($fieldSettings)
 Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
 fromHash ($hash)
 Converts an $hash to the Value defined by the field type. More...
 
 fromPersistenceValue (FieldValue $fieldValue)
 Converts a persistence $fieldValue to a Value. More...
 
 getName ($value)
 Returns the name of the given field value. More...
 
 isSearchable ()
 Returns whether the field type is searchable. More...
 
 toHash ($value)
 Converts a $Value to a hash. More...
 
 toPersistenceValue ($value)
 Converts a $value to a persistence value. More...
 
 validate (FieldDefinition $fieldDefinition, $fieldValue)
 Validates a field based on the validators in the field definition. More...
 
 validateValidatorConfiguration ($validatorConfiguration)
 Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
 acceptValue ($inputValue)
 Potentially builds and checks the type and structure of the $inputValue. More...
 
 fieldSettingsFromHash ($fieldSettingsHash)
 Converts the given $fieldSettingsHash to field settings of the type. More...
 
 fieldSettingsToHash ($fieldSettings)
 Converts the given $fieldSettings to a simple hash format. More...
 
 fromPersistenceValue (FieldValue $fieldValue)
 Converts a persistence $fieldValue to a Value. More...
 
 getRelations ($fieldValue)
 Returns relation data extracted from value. More...
 
 getSettingsSchema ()
 Returns a schema for the settings expected by the FieldType. More...
 
 getValidatorConfigurationSchema ()
 Returns a schema for the validator configuration expected by the FieldType. More...
 
 isEmptyValue ($value)
 Returns if the given $value is considered empty by the field type. More...
 
 isSearchable ()
 Returns whether the field type is searchable. More...
 
 toPersistenceValue ($value)
 Converts a $value to a persistence value. More...
 
 validate (FieldDefinition $fieldDefinition, $fieldValue)
 Validates a field based on the validators in the field definition. More...
 
 validateFieldSettings ($fieldSettings)
 Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
 
 validateValidatorConfiguration ($validatorConfiguration)
 Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
 
 validatorConfigurationFromHash ($validatorConfigurationHash)
 Converts the given $validatorConfigurationHash to a validator configuration of the type. More...
 
 validatorConfigurationToHash ($validatorConfiguration)
 Converts the given $validatorConfiguration to a simple hash format. More...
 

Public Attributes

const TYPE_FLASH = 'flash'
 List of possible media type settings. More...
 
const TYPE_HTML5_AUDIO = 'html5_audio'
 
const TYPE_HTML5_VIDEO = 'html5_video'
 
const TYPE_QUICKTIME = 'quick_time'
 
const TYPE_REALPLAYER = 'real_player'
 
const TYPE_SILVERLIGHT = 'silverlight'
 
const TYPE_WINDOWSMEDIA = 'windows_media_player'
 

Protected Member Functions

 completeValue ($value)
 Attempts to complete the data in $value. More...
 
 createValue (array $inputValue)
 Creates a specific value of the derived class from $inputValue. More...
 
 internalAcceptValue ($inputValue)
 Implements the core of {. More...
 
- Protected Member Functions inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
 completeValue ($value)
 Attempts to complete the data in $value. More...
 
 createValue (array $inputValue)
 Creates a specific value of the derived class from $inputValue. More...
 
 getSortInfo ($value)
 BinaryBase does not support sorting. More...
 
 internalAcceptValue ($inputValue)
 Implements the core of {. More...
 
- Protected Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
 getSortInfo ($value)
 Returns information for FieldValue->$sortKey relevant to the field type. More...
 
 internalAcceptValue ($inputValue)
 Implements the core of {. More...
 

Protected Attributes

 $settingsSchema
 
- Protected Attributes inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
 $validatorConfigurationSchema
 
- Protected Attributes inherited from eZ\Publish\Core\FieldType\FieldType
 $settingsSchema = array()
 
 $validatorConfigurationSchema = array()
 

Static Private Attributes

static $availableTypes
 Type constants for validation. More...
 

Detailed Description

The TextLine field type.

This field type represents a simple string.

Member Function Documentation

eZ\Publish\Core\FieldType\Media\Type::completeValue (   $value)
protected

Attempts to complete the data in $value.

Parameters
Value$value
Returns
void
eZ\Publish\Core\FieldType\Media\Type::createValue ( array  $inputValue)
protected

Creates a specific value of the derived class from $inputValue.

Parameters
array$inputValue
Returns
Value
eZ\Publish\Core\FieldType\Media\Type::fromPersistenceValue ( FieldValue  $fieldValue)

Converts a persistence $fieldValue to a Value.

This method builds a field type value from the $data and $externalData properties.

Parameters
\eZ\Publish\SPI\Persistence\Content\FieldValue$fieldValue
Returns
mixed
eZ\Publish\Core\FieldType\Media\Type::getEmptyValue ( )

Returns the fallback default value of field type when no such default value is provided in the field definition in content types.

Returns

Implements eZ\Publish\API\Repository\FieldType.

eZ\Publish\Core\FieldType\Media\Type::getFieldTypeIdentifier ( )

Returns the field type identifier for this field type.

Returns
string

Implements eZ\Publish\API\Repository\FieldType.

eZ\Publish\Core\FieldType\Media\Type::internalAcceptValue (   $inputValue)
protected

Implements the core of {.

See Also
acceptValue()}.
Parameters
mixed$inputValue
Returns
The potentially converted and structurally plausible value.
eZ\Publish\Core\FieldType\Media\Type::toHash (   $value)

Converts a $Value to a hash.

Parameters
\eZ\Publish\Core\FieldType\Media\Value$value
Returns
mixed

Implements eZ\Publish\API\Repository\FieldType.

eZ\Publish\Core\FieldType\Media\Type::validateFieldSettings (   $fieldSettings)

Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

Parameters
mixed$fieldSettings
Returns
[]

Member Data Documentation

eZ\Publish\Core\FieldType\Media\Type::$availableTypes
staticprivate
Initial value:
= array(
self::TYPE_FLASH,
self::TYPE_QUICKTIME,
self::TYPE_REALPLAYER,
self::TYPE_SILVERLIGHT,
self::TYPE_WINDOWSMEDIA,
self::TYPE_HTML5_VIDEO,
self::TYPE_HTML5_AUDIO
)

Type constants for validation.

eZ\Publish\Core\FieldType\Media\Type::$settingsSchema
protected
Initial value:
= array(
'mediaType' => array(
'type' => 'choice',
'default' => self::TYPE_HTML5_VIDEO,
)
)
const eZ\Publish\Core\FieldType\Media\Type::TYPE_FLASH = 'flash'

List of possible media type settings.

const eZ\Publish\Core\FieldType\Media\Type::TYPE_HTML5_AUDIO = 'html5_audio'
const eZ\Publish\Core\FieldType\Media\Type::TYPE_HTML5_VIDEO = 'html5_video'
const eZ\Publish\Core\FieldType\Media\Type::TYPE_QUICKTIME = 'quick_time'
const eZ\Publish\Core\FieldType\Media\Type::TYPE_REALPLAYER = 'real_player'
const eZ\Publish\Core\FieldType\Media\Type::TYPE_SILVERLIGHT = 'silverlight'
const eZ\Publish\Core\FieldType\Media\Type::TYPE_WINDOWSMEDIA = 'windows_media_player'

The documentation for this class was generated from the following file: