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

Core/Repository/Values/ContentType/FieldType.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\Values\ContentType;
8
9 use eZ\Publish\API\Repository\FieldType as FieldTypeInterface;
10 use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition as APIFieldDefinition;
11 use eZ\Publish\SPI\FieldType\FieldType as SPIFieldTypeInterface;
12 use eZ\Publish\SPI\FieldType\Value;
13
21 class FieldType implements FieldTypeInterface
22 {
28 protected $internalFieldType;
29
33 public function __construct(SPIFieldTypeInterface $fieldType)
34 {
35 $this->internalFieldType = $fieldType;
36 }
37
43 public function getFieldTypeIdentifier()
44 {
45 return $this->internalFieldType->getFieldTypeIdentifier();
46 }
47
48 public function getName($value)
49 {
50 return $this->internalFieldType->getName($value);
51 }
52
72 public function getSettingsSchema()
73 {
74 return $this->internalFieldType->getSettingsSchema();
75 }
76
116 public function getValidatorConfigurationSchema()
117 {
118 return $this->internalFieldType->getValidatorConfigurationSchema();
119 }
120
126 public function isSearchable()
127 {
128 return $this->internalFieldType->isSearchable();
129 }
130
136 public function isSingular()
137 {
138 return $this->internalFieldType->isSingular();
139 }
140
146 public function onlyEmptyInstance()
147 {
148 return $this->internalFieldType->onlyEmptyInstance();
149 }
150
157 public function getEmptyValue()
158 {
159 return $this->internalFieldType->getEmptyValue();
160 }
161
175 public function isEmptyValue($value)
176 {
177 return $this->internalFieldType->isEmptyValue($value);
178 }
179
187 public function fromHash($hash)
188 {
189 return $this->internalFieldType->fromHash($hash);
190 }
191
199 public function toHash($value)
200 {
201 return $this->internalFieldType->toHash($value);
202 }
203
211 public function fieldSettingsToHash($fieldSettings)
212 {
213 return $this->internalFieldType->fieldSettingsToHash($fieldSettings);
214 }
215
225 public function fieldSettingsFromHash($fieldSettingsHash)
226 {
227 return $this->internalFieldType->fieldSettingsFromHash($fieldSettingsHash);
228 }
229
237 public function validatorConfigurationToHash($validatorConfiguration)
238 {
239 return $this->internalFieldType->validatorConfigurationToHash($validatorConfiguration);
240 }
241
250 public function validatorConfigurationFromHash($validatorConfigurationHash)
251 {
252 return $this->internalFieldType->validatorConfigurationFromHash($validatorConfigurationHash);
253 }
254
265 public function validateValidatorConfiguration($validatorConfiguration)
266 {
267 return $this->internalFieldType->validateValidatorConfiguration($validatorConfiguration);
268 }
269
280 public function validateFieldSettings($fieldSettings)
281 {
282 return $this->internalFieldType->validateFieldSettings($fieldSettings);
283 }
284
293 public function validateValue(APIFieldDefinition $fieldDef, Value $value)
294 {
295 return $this->internalFieldType->validate($fieldDef, $value);
296 }
297 }
eZ\Publish\API\Repository\Values\ContentType\FieldDefinition
Definition: API/Repository/Values/ContentType/FieldDefinition.php:31
eZ\Publish\Core\Repository\Values\ContentType\FieldType
This class represents a FieldType available to Public API users.
Definition: Core/Repository/Values/ContentType/FieldType.php:22
eZ\Publish\Core\Repository\Values\ContentType\FieldType\validateValidatorConfiguration
validateValidatorConfiguration($validatorConfiguration)
Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.
Definition: Core/Repository/Values/ContentType/FieldType.php:265
eZ\Publish\Core\Repository\Values\ContentType\FieldType\$internalFieldType
$internalFieldType
Definition: Core/Repository/Values/ContentType/FieldType.php:28
eZ\Publish\Core\Repository\Values\ContentType\FieldType\getFieldTypeIdentifier
getFieldTypeIdentifier()
Returns the field type identifier for this field type.
Definition: Core/Repository/Values/ContentType/FieldType.php:43
eZ\Publish\Core\Repository\Values\ContentType\FieldType\getValidatorConfigurationSchema
getValidatorConfigurationSchema()
Returns a schema for the validator configuration expected by the FieldType.
Definition: Core/Repository/Values/ContentType/FieldType.php:116
eZ\Publish\Core\Repository\Values\ContentType\FieldType\isSingular
isSingular()
Indicates if the field definition of this type can appear only once in the same ContentType.
Definition: Core/Repository/Values/ContentType/FieldType.php:136
eZ\Publish\Core\Repository\Values\ContentType\FieldType\isSearchable
isSearchable()
Indicates if the field type supports indexing and sort keys for searching.
Definition: Core/Repository/Values/ContentType/FieldType.php:126
eZ\Publish\Core\Repository\Values\ContentType\FieldType\getSettingsSchema
getSettingsSchema()
Returns a schema for the settings expected by the FieldType.
Definition: Core/Repository/Values/ContentType/FieldType.php:72
eZ\Publish\Core\Repository\Values\ContentType\FieldType\fromHash
fromHash($hash)
Converts an $hash to the Value defined by the field type.
Definition: Core/Repository/Values/ContentType/FieldType.php:187
eZ\Publish\Core\Repository\Values\ContentType\FieldType\isEmptyValue
isEmptyValue($value)
Returns if the given $value is considered empty by the field type.
Definition: Core/Repository/Values/ContentType/FieldType.php:175
eZ\Publish\Core\Repository\Values\ContentType\FieldType\validatorConfigurationFromHash
validatorConfigurationFromHash($validatorConfigurationHash)
Converts the given $validatorConfigurationHash to a validator configuration of the type.
Definition: Core/Repository/Values/ContentType/FieldType.php:250
eZ\Publish\Core\Repository\Values\ContentType\FieldType\fieldSettingsToHash
fieldSettingsToHash($fieldSettings)
Converts the given $fieldSettings to a simple hash format.
Definition: Core/Repository/Values/ContentType/FieldType.php:211
eZ\Publish\Core\Repository\Values\ContentType\FieldType\toHash
toHash($value)
Converts a Value to a hash.
Definition: Core/Repository/Values/ContentType/FieldType.php:199
eZ\Publish\Core\Repository\Values\ContentType\FieldType\getEmptyValue
getEmptyValue()
Returns the fallback default value of field type when no such default value is provided in the field ...
Definition: Core/Repository/Values/ContentType/FieldType.php:157
eZ\Publish\Core\Repository\Values\ContentType\FieldType\onlyEmptyInstance
onlyEmptyInstance()
Indicates if the field definition of this type can be added to a ContentType with Content instances.
Definition: Core/Repository/Values/ContentType/FieldType.php:146
eZ\Publish\Core\Repository\Values\ContentType\FieldType\__construct
__construct(SPIFieldTypeInterface $fieldType)
Definition: Core/Repository/Values/ContentType/FieldType.php:33
eZ\Publish\Core\Repository\Values\ContentType\FieldType\validateValue
validateValue(APIFieldDefinition $fieldDef, Value $value)
Validates a field value based on the validator configuration in the field definition.
Definition: Core/Repository/Values/ContentType/FieldType.php:293
eZ\Publish\Core\Repository\Values\ContentType\FieldType\fieldSettingsFromHash
fieldSettingsFromHash($fieldSettingsHash)
Converts the given $fieldSettingsHash to field settings of the type.
Definition: Core/Repository/Values/ContentType/FieldType.php:225
eZ\Publish\Core\Repository\Values\ContentType\FieldType\validateFieldSettings
validateFieldSettings($fieldSettings)
Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.
Definition: Core/Repository/Values/ContentType/FieldType.php:280
eZ\Publish\Core\Repository\Values\ContentType\FieldType\validatorConfigurationToHash
validatorConfigurationToHash($validatorConfiguration)
Converts the given $validatorConfiguration to a simple hash format.
Definition: Core/Repository/Values/ContentType/FieldType.php:237
eZ\Publish\Core\Repository\Values\ContentType\FieldType\getName
getName($value)
Definition: Core/Repository/Values/ContentType/FieldType.php:48
eZ\Publish\API\Repository\FieldType
Interface that FieldTypes expose to the public API.
Definition: API/Repository/FieldType.php:18
eZ\Publish\SPI\FieldType\FieldType
The field type interface which all field types have to implement.
Definition: SPI/FieldType/FieldType.php:30
eZ\Publish\SPI\FieldType\Value
Interface for field value classes.
Definition: SPI/FieldType/Value.php:13
eZ\Publish\Core\Repository\Values\ContentType
Definition: Core/Repository/Values/ContentType/ContentType.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.