Commit 08c9054e authored by alexpott's avatar alexpott
Browse files

Issue #2181601 by damiankloip:...

Issue #2181601 by damiankloip: Drupal\serialization\Normalizer\EntityNormalizer should extend ComplexDataNormalizer.
parent 808eb743
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/** /**
* Normalizes/denormalizes Drupal entity objects into an array structure. * Normalizes/denormalizes Drupal entity objects into an array structure.
*/ */
class EntityNormalizer extends NormalizerBase implements DenormalizerInterface { class EntityNormalizer extends ComplexDataNormalizer implements DenormalizerInterface {
/** /**
* The interface or class that this Normalizer supports. * The interface or class that this Normalizer supports.
...@@ -40,18 +40,6 @@ public function __construct(EntityManagerInterface $entity_manager) { ...@@ -40,18 +40,6 @@ public function __construct(EntityManagerInterface $entity_manager) {
$this->entityManager = $entity_manager; $this->entityManager = $entity_manager;
} }
/**
* {@inheritdoc}
*/
public function normalize($object, $format = NULL, array $context = array()) {
$attributes = array();
foreach ($object as $name => $field) {
$attributes[$name] = $this->serializer->normalize($field, $format);
}
return $attributes;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment