Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.37 KB

File metadata and controls

50 lines (35 loc) · 1.37 KB

NormalizeTransformer

Normalize the input (typically an object) into an array or a scalar, using the Symfony Serializer normalizer.

See also NormalizerTask for the task equivalent.

Transformer reference

  • Service: CleverAge\ProcessBundle\Transformer\Serialization\NormalizeTransformer
  • Transformer code: normalize

Accepted inputs

any: data supported by the configured normalizers (typically an object)

Possible outputs

array, string, int, float, bool, \ArrayObject or null: the normalized representation

Options

Code Type Required Default Description
format string|null null Format passed to the normalizer
context array [] Normalization context (groups, attributes…)

Examples

  • Normalize an object with default options
# Transformer options level
normalize: ~
  • Normalize an object using serialization groups
# Transformer options level
normalize:
  context:
    groups: [export]