PrimitiveDataNormalizer
class PrimitiveDataNormalizer extends NormalizerBase (View source)
Converts primitive data objects to their casted values.
Traits
A trait providing methods for serialized columns.
Properties
| protected | $supportedInterfaceOrClass | {@inheritdoc} | |
| protected string|string[] | $format | List of formats which supports (de-)normalization. |
from NormalizerBase |
Methods
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
Checks if the provided format is supported by this normalizer.
Checks if there is a serialized string for a column.
Checks if the data contains string value for serialize column.
Gets the names of all serialized properties.
Gets the names of all properties the plugin treats as serialized data.
{@inheritdoc}
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.
protected
checkForSerializedStrings(mixed $data, string $class, FieldItemInterface $field_item)
Checks if there is a serialized string for a column.
protected bool
dataHasStringForSerializeColumn(FieldItemInterface $field_item, array $data)
Checks if the data contains string value for serialize column.
protected string[]
getSerializedPropertyNames(FieldItemInterface $field_item)
Gets the names of all serialized properties.
protected string[]
getCustomSerializedPropertyNames(FieldItemInterface $field_item)
Gets the names of all properties the plugin treats as serialized data.
This allows the field storage definition or entity type to provide a setting for serialized properties. This can be used for fields that handle serialized data themselves and do not rely on the serialized schema flag.
normalize($object, $format = NULL, array $context = [])
{@inheritdoc}