plugin/claco-form/Serializer/FieldValueSerializer.php
public function serialize(FieldValue $fieldValue, array $options = [])
    {
        $serialized = [
            'id' => $fieldValue->getUuid(),
        ];

        if (in_array(Options::SERIALIZE_MINIMAL, $options)) {
            $serialized = array_merge($serialized, [
                'field' => [
                    'id' => $fieldValue->getField()->getUuid(),
                ],
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        } else {
            $serialized = array_merge($serialized, [
                'field' => $this->fieldSerializer->serialize($fieldValue->getField(), [Options::SERIALIZE_MINIMAL]),
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        }

        return $serialized;
    }
public function serialize(FieldValue $fieldValue, array $options = [])
    {
        $serialized = [
            'id' => $fieldValue->getUuid(),
        ];

        if (in_array(Options::SERIALIZE_MINIMAL, $options)) {
            $serialized = array_merge($serialized, [
                'field' => [
                    'id' => $fieldValue->getField()->getUuid(),
                ],
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        } else {
            $serialized = array_merge($serialized, [
                'field' => $this->fieldSerializer->serialize($fieldValue->getField(), [Options::SERIALIZE_MINIMAL]),
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        }

        return $serialized;
    }
public function serialize ( FieldValue $ fieldValue , array $ options = [ ] ) { $ serialized = [ 'id' => $ fieldValue -> getUuid ( ) , ] ; if ( in_array ( Options :: SERIALIZE_MINIMAL , $ options ) ) { $ serialized = array_merge ( $ serialized , [ 'field' => [ 'id' => $ fieldValue -> getField ( ) -> getUuid ( ) , ] , 'fieldFacetValue' => $ this -> fieldFacetValueSerializer -> serialize ( $ fieldValue -> getFieldFacetValue ( ) , [ 'minimal' ] ) , ] ) ; } else { $ serialized = array_merge ( $ serialized , [ 'field' => $ this -> fieldSerializer -> serialize ( $ fieldValue -> getField ( ) , [ Options :: SERIALIZE_MINIMAL ] ) , 'fieldFacetValue' => $ this -> fieldFacetValueSerializer -> serialize ( $ fieldValue -> getFieldFacetValue ( ) , [ 'minimal' ] ) , ] ) ; } return $ serialized ; }
Serializes a FieldValue entity for the JSON api.

@param FieldValue $fieldValue - the field value to serialize
@param array      $options    - a list of serialization options

@return array - the serialized representation of the field value
Serializes a FieldValue entity for the JSON api .