/**
  * Serializes the given $value for $fieldType with $generator into
  * $elementName.
  *
  * @param string $elementName
  * @param \eZ\Publish\Core\REST\Common\Output\Generator $generator
  * @param \eZ\Publish\API\Repository\FieldType $fieldType
  * @param mixed $value
  */
 protected function serializeValue($elementName, Generator $generator, FieldType $fieldType, $value)
 {
     $hash = $fieldType->toHash($value);
     $fieldTypeIdentifier = $fieldType->getFieldTypeIdentifier();
     if ($this->fieldTypeProcessorRegistry->hasProcessor($fieldTypeIdentifier)) {
         $processor = $this->fieldTypeProcessorRegistry->getProcessor($fieldTypeIdentifier);
         $hash = $processor->postProcessValueHash($hash);
     }
     $this->serializeHash($elementName, $generator, $hash);
 }
 /**
  * Returns the field type identifier for this field type
  *
  * @return string
  */
 public function getFieldTypeIdentifier()
 {
     return $this->innerFieldType->getFieldTypeIdentifier();
 }