From bdcdf85e691ac7329f6d2f02ac5d07ad9e71f655 Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Mon, 16 Nov 2020 10:21:09 -0500 Subject: [PATCH] Only process Plugins that do not depend on other --- .../StrawberryRunnersEventPreSavePostProcessingSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EventSubscriber/StrawberryRunnersEventPreSavePostProcessingSubscriber.php b/src/EventSubscriber/StrawberryRunnersEventPreSavePostProcessingSubscriber.php index fd7d55a..153fbe2 100644 --- a/src/EventSubscriber/StrawberryRunnersEventPreSavePostProcessingSubscriber.php +++ b/src/EventSubscriber/StrawberryRunnersEventPreSavePostProcessingSubscriber.php @@ -156,7 +156,8 @@ public function onEntityPresave(StrawberryfieldCrudEvent $event) { $plugin_config_entities = $this->entityTypeManager->getListBuilder('strawberry_runners_postprocessor')->load(); $active_plugins = []; foreach($plugin_config_entities as $plugin_config_entity) { - if ($plugin_config_entity->isActive()) { + // Only get first level (no Parents) and Active ones. + if ($plugin_config_entity->isActive() && $plugin_config_entity->getParent() == '') { $entity_id = $plugin_config_entity->id(); $configuration_options = $plugin_config_entity->getPluginconfig(); $configuration_options['configEntity'] = $entity_id;