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

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer Class Reference

Serializes FieldType related data for REST output. More...

## Public Member Functions
| __construct (FieldTypeService $fieldTypeService, FieldTypeProcessorRegistry $fieldTypeProcessorRegistry)
| serializeFieldValue (Generator $generator, ContentType $contentType, Field $field)
| Serializes the field value of $field through $generator. More...
| serializeFieldDefaultValue (Generator $generator, $fieldTypeIdentifier, $defaultValue)
| Serializes the $defaultValue for $fieldDefIdentifier through $generator. More...
| serializeFieldSettings (Generator $generator, $fieldTypeIdentifier, $settings)
| Serializes $settings as fieldSettings for $fieldDefinition using $generator. More...
| serializeValidatorConfiguration (Generator $generator, $fieldTypeIdentifier, $validatorConfiguration)
| Serializes $validatorConfiguration for $fieldDefinition using $generator. More...

## Protected Member Functions
| getFieldType ($fieldTypeIdentifier)
| Returns the field type with $fieldTypeIdentifier. More...
| serializeValue ($elementName, Generator $generator, FieldType $fieldType, $value)
| Serializes the given $value for $fieldType with $generator into $elementName. More...
| serializeHash ($elementName, Generator $generator, $hash)
| Serializes the given $hash with $generator into $elementName. More...

## Protected Attributes
| $fieldTypeService
| $fieldTypeProcessorRegistry

## Detailed Description

Serializes FieldType related data for REST output.

Definition at line 18 of file FieldTypeSerializer.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::__construct | ( | FieldTypeService | $fieldTypeService,
|  | FieldTypeProcessorRegistry | $fieldTypeProcessorRegistry
| ) |  |

Parameters

  \eZ\Publish\API\Repository\FieldTypeService | $fieldTypeService |
  \eZ\Publish\Core\REST\Common\FieldTypeProcessorRegistry | $fieldTypeProcessorRegistry |

Definition at line 34 of file FieldTypeSerializer.php.

References eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\$fieldTypeProcessorRegistry, and eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\$fieldTypeService.

## Member Function Documentation

## ◆ getFieldType()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::getFieldType | ( |  | $fieldTypeIdentifier | ) |
| protected

Returns the field type with $fieldTypeIdentifier.

Parameters

  string | $fieldTypeIdentifier |

Returns
  \eZ\Publish\API\Repository\FieldType

Definition at line 124 of file FieldTypeSerializer.php.

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeFieldDefaultValue().

## ◆ serializeFieldDefaultValue()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeFieldDefaultValue | ( | Generator | $generator,
|  |  | $fieldTypeIdentifier,
|  |  | $defaultValue
| ) |  |

Serializes the $defaultValue for $fieldDefIdentifier through $generator.

Parameters

  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  string | $fieldTypeIdentifier |
  mixed | $defaultValue |

Definition at line 66 of file FieldTypeSerializer.php.

References eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\getFieldType(), and eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeValue().

## ◆ serializeFieldSettings()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeFieldSettings | ( | Generator | $generator,
|  |  | $fieldTypeIdentifier,
|  |  | $settings
| ) |  |

Serializes $settings as fieldSettings for $fieldDefinition using $generator.

Parameters

  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  string | $fieldTypeIdentifier |
  mixed | $settings |

Definition at line 84 of file FieldTypeSerializer.php.

References eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeHash().

## ◆ serializeFieldValue()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeFieldValue | ( | Generator | $generator,
|  | ContentType | $contentType,
|  | Field | $field
| ) |  |

Serializes the field value of $field through $generator.

Parameters

  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  \eZ\Publish\API\Repository\Values\ContentType\ContentType | $contentType |
  \eZ\Publish\API\Repository\Values\Content\Field | $field |

Definition at line 47 of file FieldTypeSerializer.php.

References eZ\Publish\API\Repository\Values\ContentType\ContentType\getFieldDefinition(), and eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeValue().

## ◆ serializeHash()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeHash | ( |  | $elementName,
|  | Generator | $generator,
|  |  | $hash
| ) |  |
| protected

Serializes the given $hash with $generator into $elementName.

Parameters

  string | $elementName |
  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  mixed | $hash |

Definition at line 160 of file FieldTypeSerializer.php.

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeFieldSettings(), eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeValidatorConfiguration(), and eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeValue().

## ◆ serializeValidatorConfiguration()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeValidatorConfiguration | ( | Generator | $generator,
|  |  | $fieldTypeIdentifier,
|  |  | $validatorConfiguration
| ) |  |

Serializes $validatorConfiguration for $fieldDefinition using $generator.

Parameters

  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  string | $fieldTypeIdentifier |
  mixed | $validatorConfiguration |

Definition at line 104 of file FieldTypeSerializer.php.

References eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeHash().

## ◆ serializeValue()

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::serializeValue | ( |  | $elementName,
|  | Generator | $generator,
|  | FieldType | $fieldType,
|  |  | $value
| ) |  |
| protected

Serializes the given $value for $fieldType with $generator into $elementName.

Parameters

  string | $elementName |
  \eZ\Publish\Core\REST\Common\Output\Generator | $generator |
  \eZ\Publish\API\Repository\FieldType | $fieldType |
  mixed | $value |

Definition at line 140 of file FieldTypeSerializer.php.

References eZ\Publish\API\Repository\FieldType\getFieldTypeIdentifier(), eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeHash(), and eZ\Publish\API\Repository\FieldType\toHash().

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeFieldDefaultValue(), and eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\serializeFieldValue().

## Member Data Documentation

## ◆ $fieldTypeProcessorRegistry

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::$fieldTypeProcessorRegistry
| protected

Definition at line 28 of file FieldTypeSerializer.php.

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\__construct().

## ◆ $fieldTypeService

eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer::$fieldTypeService
| protected

Definition at line 25 of file FieldTypeSerializer.php.

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\__construct().

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

- FieldTypeSerializer.php

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