You are here

public function DataNormalizer::normalize in REST Views 8

Same name and namespace in other branches
  1. 2.0.x src/Normalizer/DataNormalizer.php \Drupal\rest_views\Normalizer\DataNormalizer::normalize()

File

src/Normalizer/DataNormalizer.php, line 25

Class

DataNormalizer
Unwrap a SerializedData object and normalize the data inside.

Namespace

Drupal\rest_views\Normalizer

Code

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());
}