protected function SyncNormalizerDecoratorTrait::decorateNormalization in Content Synchronization 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/SyncNormalizerDecoratorTrait.php \Drupal\content_sync\Plugin\SyncNormalizerDecoratorTrait::decorateNormalization()
1 call to SyncNormalizerDecoratorTrait::decorateNormalization()
- ContentEntityNormalizer::normalize in src/
Normalizer/ ContentEntityNormalizer.php
File
- src/
Plugin/ SyncNormalizerDecoratorTrait.php, line 9
Class
Namespace
Drupal\content_sync\PluginCode
protected function decorateNormalization(array &$normalized_entity, ContentEntityInterface $entity, $format, array $context = []) {
$plugins = $this
->getDecoratorManager()
->getDefinitions();
foreach ($plugins as $decorator) {
/* @var $instance SyncNormalizerDecoratorInterface */
$instance = $this
->getDecoratorManager()
->createInstance($decorator['id']);
$instance
->decorateNormalization($normalized_entity, $entity, $format, $context);
}
}