TypedDataNormalizer.php in Zircon Profile 8.0
Same filename and directory in other branches
Namespace
Drupal\serialization\NormalizerFile
core/modules/serialization/src/Normalizer/TypedDataNormalizer.phpView source
<?php
/**
* @file
* Contains \Drupal\serialization\Normalizer\TypedDataNormalizer.
*/
namespace Drupal\serialization\Normalizer;
/**
* Converts typed data objects to arrays.
*/
class TypedDataNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
*/
protected $supportedInterfaceOrClass = 'Drupal\\Core\\TypedData\\TypedDataInterface';
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = array()) {
return $object
->getValue();
}
}
Classes
Name | Description |
---|---|
TypedDataNormalizer | Converts typed data objects to arrays. |