class DataNormalizer in REST Views 8
Same name and namespace in other branches
- 2.0.x src/Normalizer/DataNormalizer.php \Drupal\rest_views\Normalizer\DataNormalizer
Unwrap a SerializedData object and normalize the data inside.
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\rest_views\Normalizer\DataNormalizer
Expanded class hierarchy of DataNormalizer
See also
\Drupal\rest_views\SerializedData
1 file declares its use of DataNormalizer
- EntityFieldExportTest.php in tests/
src/ Unit/ EntityFieldExportTest.php
1 string reference to 'DataNormalizer'
1 service uses DataNormalizer
File
- src/
Normalizer/ DataNormalizer.php, line 13
Namespace
Drupal\rest_views\NormalizerView source
class DataNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var array
*/
protected $supportedInterfaceOrClass = [
SerializedData::class,
];
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = []) {
/** @var \Drupal\rest_views\SerializedData $object */
/** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer */
$normalizer = $this->serializer;
return $normalizer
->normalize($object
->getData());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableNormalizerInterface:: |
constant | Name of key for bubbling cacheability metadata via serialization context. | ||
DataNormalizer:: |
protected | property |
The interface or class that this Normalizer supports. Overrides NormalizerBase:: |
|
DataNormalizer:: |
public | function | Normalizes an object into a set of arrays/scalars. | |
NormalizerBase:: |
protected | property | List of formats which supports (de-)normalization. | 3 |
NormalizerBase:: |
protected | function | Adds cacheability if applicable. | |
NormalizerBase:: |
protected | function | Checks if the provided format is supported by this normalizer. | 2 |
NormalizerBase:: |
public | function | Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() | 1 |
NormalizerBase:: |
public | function | Checks whether the given class is supported for normalization by this normalizer. | 1 |