eZPublishCommunityProject  2013.9
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)
 
 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...
 
 serializeFieldValue (Generator $generator, ContentType $contentType, Field $field)
 Serializes the field value of $field through $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...
 
 serializeHash ($elementName, Generator $generator, $hash)
 Serializes the given $hash with $generator into $elementName. More...
 
 serializeValue ($elementName, Generator $generator, FieldType $fieldType, $value)
 Serializes the given $value for $fieldType with $generator into $elementName. More...
 

Protected Attributes

 $fieldTypeProcessorRegistry
 
 $fieldTypeService
 

Detailed Description

Serializes FieldType related data for REST output.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Returns the field type with $fieldTypeIdentifier.

Parameters
string$fieldTypeIdentifier
Returns

Referenced by eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer\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
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
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
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

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().

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
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

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

Member Data Documentation

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

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