PHP Class eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer

Show file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$fieldTypeProcessorRegistry eZ\Publish\Core\REST\Common\FieldTypeProcessorRegistry
$fieldTypeService eZ\Publish\API\Repository\FieldTypeService FieldTypeService.

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\FieldTypeService $fieldTypeService, FieldTypeProcessorRegistry $fieldTypeProcessorRegistry )
serializeFieldDefaultValue ( Generator $generator, string $fieldTypeIdentifier, mixed $defaultValue ) Serializes the $defaultValue for $fieldDefIdentifier through $generator.
serializeFieldSettings ( Generator $generator, string $fieldTypeIdentifier, mixed $settings ) Serializes $settings as fieldSettings for $fieldDefinition using $generator.
serializeFieldValue ( Generator $generator, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, eZ\Publish\API\Repository\Values\Content\Field $field ) Serializes the field value of $field through $generator.
serializeValidatorConfiguration ( Generator $generator, string $fieldTypeIdentifier, mixed $validatorConfiguration ) Serializes $validatorConfiguration for $fieldDefinition using $generator.

Protected Methods

Method Description
getFieldType ( string $fieldTypeIdentifier ) : eZ\Publish\API\Repository\FieldType Returns the field type with $fieldTypeIdentifier.
serializeHash ( string $elementName, Generator $generator, mixed $hash ) Serializes the given $hash with $generator into $elementName.
serializeValue ( string $elementName, Generator $generator, eZ\Publish\API\Repository\FieldType $fieldType, mixed $value ) Serializes the given $value for $fieldType with $generator into $elementName.

Method Details

__construct() public method

public __construct ( eZ\Publish\API\Repository\FieldTypeService $fieldTypeService, FieldTypeProcessorRegistry $fieldTypeProcessorRegistry )
$fieldTypeService eZ\Publish\API\Repository\FieldTypeService
$fieldTypeProcessorRegistry eZ\Publish\Core\REST\Common\FieldTypeProcessorRegistry

getFieldType() protected method

Returns the field type with $fieldTypeIdentifier.
protected getFieldType ( string $fieldTypeIdentifier ) : eZ\Publish\API\Repository\FieldType
$fieldTypeIdentifier string
return eZ\Publish\API\Repository\FieldType

serializeFieldDefaultValue() public method

Serializes the $defaultValue for $fieldDefIdentifier through $generator.
public serializeFieldDefaultValue ( Generator $generator, string $fieldTypeIdentifier, mixed $defaultValue )
$generator Generator
$fieldTypeIdentifier string
$defaultValue mixed

serializeFieldSettings() public method

Serializes $settings as fieldSettings for $fieldDefinition using $generator.
public serializeFieldSettings ( Generator $generator, string $fieldTypeIdentifier, mixed $settings )
$generator Generator
$fieldTypeIdentifier string
$settings mixed

serializeFieldValue() public method

Serializes the field value of $field through $generator.
public serializeFieldValue ( Generator $generator, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, eZ\Publish\API\Repository\Values\Content\Field $field )
$generator Generator
$contentType eZ\Publish\API\Repository\Values\ContentType\ContentType
$field eZ\Publish\API\Repository\Values\Content\Field

serializeHash() protected method

Serializes the given $hash with $generator into $elementName.
protected serializeHash ( string $elementName, Generator $generator, mixed $hash )
$elementName string
$generator Generator
$hash mixed

serializeValidatorConfiguration() public method

Serializes $validatorConfiguration for $fieldDefinition using $generator.
public serializeValidatorConfiguration ( Generator $generator, string $fieldTypeIdentifier, mixed $validatorConfiguration )
$generator Generator
$fieldTypeIdentifier string
$validatorConfiguration mixed

serializeValue() protected method

Serializes the given $value for $fieldType with $generator into $elementName.
protected serializeValue ( string $elementName, Generator $generator, eZ\Publish\API\Repository\FieldType $fieldType, mixed $value )
$elementName string
$generator Generator
$fieldType eZ\Publish\API\Repository\FieldType
$value mixed

Property Details

$fieldTypeProcessorRegistry protected property

protected FieldTypeProcessorRegistry,eZ\Publish\Core\REST\Common $fieldTypeProcessorRegistry
return eZ\Publish\Core\REST\Common\FieldTypeProcessorRegistry

$fieldTypeService protected property

FieldTypeService.
protected FieldTypeService,eZ\Publish\API\Repository $fieldTypeService
return eZ\Publish\API\Repository\FieldTypeService