DataNormalizer.php in REST Views 2.0.x
File
src/Normalizer/DataNormalizer.php
View source
<?php
namespace Drupal\rest_views\Normalizer;
use Drupal\rest_views\SerializedData;
use Drupal\serialization\Normalizer\NormalizerBase;
class DataNormalizer extends NormalizerBase {
protected $supportedInterfaceOrClass = [
SerializedData::class,
];
public function normalize($object, $format = NULL, array $context = []) {
$normalizer = $this->serializer;
return $normalizer
->normalize($object
->getData());
}
}
Classes
Name |
Description |
DataNormalizer |
Unwrap a SerializedData object and normalize the data inside. |