Version 1
[yaffs-website] / web / core / modules / serialization / src / Normalizer / ConfigEntityNormalizer.php
1 <?php
2
3 namespace Drupal\serialization\Normalizer;
4
5 /**
6  * Normalizes/denormalizes Drupal config entity objects into an array structure.
7  */
8 class ConfigEntityNormalizer extends EntityNormalizer {
9
10   /**
11    * The interface or class that this Normalizer supports.
12    *
13    * @var array
14    */
15   protected $supportedInterfaceOrClass = ['Drupal\Core\Config\Entity\ConfigEntityInterface'];
16
17   /**
18    * {@inheritdoc}
19    */
20   public function normalize($object, $format = NULL, array $context = []) {
21     return $object->toArray();
22   }
23
24 }