FieldNormalizer
class FieldNormalizer extends FieldNormalizer (View source)
Converts the Drupal field structure to HAL array structure.
Traits
Properties
| protected | $supportedInterfaceOrClass | {@inheritdoc} | from FieldNormalizer |
| protected | $format | {@inheritdoc} |
Methods
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
Checks if the provided format is supported by this normalizer.
{@inheritdoc}
Helper function to normalize field items.
Details
supportsNormalization($data, $format = NULL)
{@inheritdoc}
supportsDenormalization($data, $type, $format = NULL)
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
This class doesn't implement DenormalizerInterface, but most of its child classes do. Therefore, this method is implemented at this level to reduce code duplication.
protected bool
checkFormat(string $format = NULL)
Checks if the provided format is supported by this normalizer.
protected
addCacheableDependency(array $context, $data)
Adds cacheability if applicable.
normalize($field_items, $format = NULL, array $context = [])
{@inheritdoc}
denormalize($data, $class, $format = NULL, array $context = [])
{@inheritdoc}
protected array
normalizeFieldItems(FieldItemListInterface $field_items, string $format, array $context)
Helper function to normalize field items.