protected function SyncNormalizerDecoratorTrait::decorateNormalization in Content Synchronization 8.2
Same name and namespace in other branches
- 3.0.x src/Plugin/SyncNormalizerDecoratorTrait.php \Drupal\content_sync\Plugin\SyncNormalizerDecoratorTrait::decorateNormalization()
1 call to SyncNormalizerDecoratorTrait::decorateNormalization()
- ContentEntityNormalizer::normalize in src/
Normalizer/ ContentEntityNormalizer.php - Normalizes an object into a set of arrays/scalars.
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);
}
}