Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
eZ\Publish\Core\FieldType\Media\Type Class Reference

The TextLine field type. More...

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

## Public Member Functions
| getFieldTypeIdentifier ()
| Returns the field type identifier for this field type. 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...
| validateFieldSettings ($fieldSettings)
| Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
| toHash (SPIValue $value)
| Converts a $Value to a hash. More...
| fromPersistenceValue (FieldValue $fieldValue)
| Converts a persistence $fieldValue to a Value. More...
| isSearchable ()
| Returns whether the field type is searchable. More...
Public Member Functions inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
| __construct (array $validators, ?RouteAwarePathGenerator $routeAwarePathGenerator=null)
| getName (SPIValue $value)
| Returns the name of the given field value. More...
| fromHash ($hash)
| Converts an $hash to the Value defined by the field type. More...
| toPersistenceValue (SPIValue $value)
| Converts a $value to a persistence value. More...
| fromPersistenceValue (PersistenceValue $fieldValue)
| Converts a persistence $fieldValue to a Value. More...
| validate (FieldDefinition $fieldDefinition, SPIValue $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
| setTransformationProcessor (TransformationProcessor $transformationProcessor)
| 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...
| applyDefaultValidatorConfiguration (&$validatorConfiguration)
| Applies the default values to the given $validatorConfiguration of a FieldDefinitionCreateStruct. More...
| applyDefaultSettings (&$fieldSettings)
| Applies the default values to the fieldSettings of a FieldDefinitionCreateStruct. More...
| isSingular ()
| Indicates if the field definition of this type can appear only once in the same ContentType. More...
| onlyEmptyInstance ()
| Indicates if the field definition of this type can be added to a ContentType with Content instances. More...
| isEmptyValue (SPIValue $value)
| Returns if the given $value is considered empty by the field type. More...
| acceptValue ($inputValue)
| Potentially builds and checks the type and structure of the $inputValue. More...
| fieldSettingsToHash ($fieldSettings)
| Converts the given $fieldSettings to a simple hash format. More...
| fieldSettingsFromHash ($fieldSettingsHash)
| Converts the given $fieldSettingsHash to field settings of the type. More...
| validatorConfigurationToHash ($validatorConfiguration)
| Converts the given $validatorConfiguration to a simple hash format. More...
| validatorConfigurationFromHash ($validatorConfigurationHash)
| Converts the given $validatorConfigurationHash to a validator configuration of the type. More...
| getRelations (SPIValue $fieldValue)
| Returns relation data extracted from value. More...
| valuesEqual (SPIValue $value1, SPIValue $value2)
Public Member Functions inherited from eZ\Publish\SPI\FieldType\FieldType
| getName (Value $value)
| Returns a human readable string representation from the given $value. More...
| validate (FieldDefinition $fieldDef, Value $value)
| Validates a field based on the validator configuration in the field definition. More...
| isEmptyValue (Value $value)
| Returns if the given $value is considered empty by the field type. More...
| toHash (Value $value)
| Converts the given $value into a plain hash format. More...
| toPersistenceValue (Value $value)
| Converts a $value to a persistence value. More...
| getRelations (Value $value)
| Returns relation data extracted from value. More...
Public Member Functions inherited from eZ\Publish\SPI\FieldType\Comparable
| valuesEqual (Value $value1, Value $value2)

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

## Protected Member Functions
| createValue (array $inputValue)
| Creates a specific value of the derived class from $inputValue. More...
| checkValueStructure (BaseValue $value)
| Throws an exception if value structure is not of expected format. More...
| completeValue (BaseValue $value)
| Attempts to complete the data in $value. More...
Protected Member Functions inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
| regenerateUri (array $inputValue)
| createValueFromInput ($inputValue)
| Inspects given $inputValue and potentially converts it into a dedicated value object. More...
| getSortInfo (BaseValue $value)
| BinaryBase does not support sorting, yet. More...
Protected Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
| getSortInfo (Value $value)
| Returns information for FieldValue->$sortKey relevant to the field type. More...
| checkValueStructure (Value $value)
| Throws an exception if value structure is not of expected format. More...

## Protected Attributes
| $settingsSchema
Protected Attributes inherited from eZ\Publish\Core\FieldType\BinaryBase\Type
| $validatorConfigurationSchema
| $routeAwarePathGenerator
Protected Attributes inherited from eZ\Publish\Core\FieldType\FieldType
| $settingsSchema = []
| $validatorConfigurationSchema = []
| $transformationProcessor

## Static Private Attributes
static | $availableTypes
| Type constants for validation. More...

## Additional Inherited Members
Static Protected Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
static | checkValueType ($value)
| Throws an exception if the given $value is not an instance of the supported value subtype. More...

## Detailed Description

The TextLine field type.

This field type represents a simple string.

Definition at line 21 of file Core/FieldType/Media/Type.php.

## Member Function Documentation

## ◆ checkValueStructure()

eZ\Publish\Core\FieldType\Media\Type::checkValueStructure | ( | BaseValue | $value | ) |
| protected

Throws an exception if value structure is not of expected format.

Exceptions

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\Type.

Definition at line 139 of file Core/FieldType/Media/Type.php.

## ◆ completeValue()

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

Attempts to complete the data in $value.

Parameters

  \eZ\Publish\Core\FieldType\Media\Value | \eZ\Publish\Core\FieldType\Value | $value |

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\Type.

Definition at line 186 of file Core/FieldType/Media/Type.php.

## ◆ createValue()

eZ\Publish\Core\FieldType\Media\Type::createValue | ( | array | $inputValue | ) |
| protected

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

Parameters

  array | $inputValue |

Returns
  \eZ\Publish\Core\FieldType\Media\Value

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\Type.

Definition at line 125 of file Core/FieldType/Media/Type.php.

References eZ\Publish\Core\FieldType\BinaryBase\Type\regenerateUri().

## ◆ fromPersistenceValue()

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
  \eZ\Publish\Core\FieldType\Media\Value

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 241 of file Core/FieldType/Media/Type.php.

References eZ\Publish\Core\FieldType\Media\Type\getEmptyValue().

## ◆ getEmptyValue()

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
  \eZ\Publish\Core\FieldType\Media\Value

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 71 of file Core/FieldType/Media/Type.php.

Referenced by eZ\Publish\Core\FieldType\Media\Type\fromPersistenceValue().

## ◆ getFieldTypeIdentifier()

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

Returns the field type identifier for this field type.

Returns
  string

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 60 of file Core/FieldType/Media/Type.php.

## ◆ isSearchable()

eZ\Publish\Core\FieldType\Media\Type::isSearchable | ( |  | ) |

Returns whether the field type is searchable.

Returns
  bool

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\Type.

Definition at line 273 of file Core/FieldType/Media/Type.php.

## ◆ toHash()

eZ\Publish\Core\FieldType\Media\Type::toHash | ( | SPIValue | $value | ) |

Converts a $Value to a hash.

Parameters

  \eZ\Publish\Core\FieldType\Media\Value | $value |

Returns
  mixed

Reimplemented from eZ\Publish\Core\FieldType\BinaryBase\Type.

Definition at line 215 of file Core/FieldType/Media/Type.php.

References eZ\Publish\Core\FieldType\FieldType\isEmptyValue().

## ◆ validateFieldSettings()

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

Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

Parameters

  mixed | $fieldSettings |

Returns
  \eZ\Publish\SPI\FieldType\ValidationError[]

Reimplemented from eZ\Publish\Core\FieldType\FieldType.

Definition at line 83 of file Core/FieldType/Media/Type.php.

## Member Data Documentation

## ◆ $availableTypes

eZ\Publish\Core\FieldType\Media\Type::$availableTypes
| static private

Initial value:
= [
self::TYPE_FLASH,
self::TYPE_QUICKTIME,
self::TYPE_REALPLAYER,
self::TYPE_SILVERLIGHT,
self::TYPE_WINDOWSMEDIA,
self::TYPE_HTML5_VIDEO,
self::TYPE_HTML5_AUDIO,
]
eZ\Publish\Core\FieldType\Media\Type\TYPE_SILVERLIGHT
const TYPE_SILVERLIGHT
Definition: Core/FieldType/Media/Type.php:29
eZ\Publish\Core\FieldType\Media\Type\TYPE_HTML5_VIDEO
const TYPE_HTML5_VIDEO
Definition: Core/FieldType/Media/Type.php:31
eZ\Publish\Core\FieldType\Media\Type\TYPE_REALPLAYER
const TYPE_REALPLAYER
Definition: Core/FieldType/Media/Type.php:28
eZ\Publish\Core\FieldType\Media\Type\TYPE_FLASH
const TYPE_FLASH
List of possible media type settings.
Definition: Core/FieldType/Media/Type.php:26
eZ\Publish\Core\FieldType\Media\Type\TYPE_QUICKTIME
const TYPE_QUICKTIME
Definition: Core/FieldType/Media/Type.php:27
eZ\Publish\Core\FieldType\Media\Type\TYPE_HTML5_AUDIO
const TYPE_HTML5_AUDIO
Definition: Core/FieldType/Media/Type.php:32
eZ\Publish\Core\FieldType\Media\Type\TYPE_WINDOWSMEDIA
const TYPE_WINDOWSMEDIA
Definition: Core/FieldType/Media/Type.php:30

Type constants for validation.

Definition at line 37 of file Core/FieldType/Media/Type.php.

## ◆ $settingsSchema

eZ\Publish\Core\FieldType\Media\Type::$settingsSchema
| protected

Initial value:
= [
'mediaType' => [
'type' => 'choice',
'default' => self::TYPE_HTML5_VIDEO,
],
]

Definition at line 48 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_FLASH

const eZ\Publish\Core\FieldType\Media\Type::TYPE_FLASH = 'flash'

List of possible media type settings.

Definition at line 26 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_HTML5_AUDIO

const eZ\Publish\Core\FieldType\Media\Type::TYPE_HTML5_AUDIO = 'html5_audio'

Definition at line 32 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_HTML5_VIDEO

const eZ\Publish\Core\FieldType\Media\Type::TYPE_HTML5_VIDEO = 'html5_video'

Definition at line 31 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_QUICKTIME

const eZ\Publish\Core\FieldType\Media\Type::TYPE_QUICKTIME = 'quick_time'

Definition at line 27 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_REALPLAYER

const eZ\Publish\Core\FieldType\Media\Type::TYPE_REALPLAYER = 'real_player'

Definition at line 28 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_SILVERLIGHT

const eZ\Publish\Core\FieldType\Media\Type::TYPE_SILVERLIGHT = 'silverlight'

Definition at line 29 of file Core/FieldType/Media/Type.php.

## ◆ TYPE_WINDOWSMEDIA

const eZ\Publish\Core\FieldType\Media\Type::TYPE_WINDOWSMEDIA = 'windows_media_player'

Definition at line 30 of file Core/FieldType/Media/Type.php.

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

- Core/FieldType/Media/Type.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.