You are here

public function TypedDataNormalizer::normalize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/serialization/src/Normalizer/TypedDataNormalizer.php \Drupal\serialization\Normalizer\TypedDataNormalizer::normalize()

Normalizes an object into a set of arrays/scalars.

Parameters

object $object object to normalize:

string $format format the normalization result will be encoded as:

array $context Context options for the normalizer:

Return value

array|string|bool|int|float|null

Overrides NormalizerInterface::normalize

File

core/modules/serialization/src/Normalizer/TypedDataNormalizer.php, line 25
Contains \Drupal\serialization\Normalizer\TypedDataNormalizer.

Class

TypedDataNormalizer
Converts typed data objects to arrays.

Namespace

Drupal\serialization\Normalizer

Code

public function normalize($object, $format = NULL, array $context = array()) {
  return $object
    ->getValue();
}