diff --git a/src/bundle/DependencyInjection/Compiler/ViewBuilderRegistryPass.php b/src/bundle/DependencyInjection/Compiler/ViewBuilderRegistryPass.php deleted file mode 100644 index 5b55d957..00000000 --- a/src/bundle/DependencyInjection/Compiler/ViewBuilderRegistryPass.php +++ /dev/null @@ -1,44 +0,0 @@ -hasDefinition(self::VIEW_BUILDER_REGISTRY) - || !$container->hasDefinition(self::VIEW_BUILDER_CONTENT_EDIT) - || !$container->hasDefinition(self::VIEW_BUILDER_CONTENT_CREATE) - ) { - return; - } - - $registry = $container->findDefinition(self::VIEW_BUILDER_REGISTRY); - - $viewBuilders = [ - $container->getDefinition(self::VIEW_BUILDER_CONTENT_EDIT), - $container->getDefinition(self::VIEW_BUILDER_CONTENT_CREATE), - ]; - - $registry->addMethodCall('addToRegistry', [$viewBuilders]); - } -} diff --git a/src/bundle/EzPlatformContentFormsBundle.php b/src/bundle/EzPlatformContentFormsBundle.php index 509605dc..6dca7b19 100644 --- a/src/bundle/EzPlatformContentFormsBundle.php +++ b/src/bundle/EzPlatformContentFormsBundle.php @@ -9,7 +9,6 @@ namespace EzSystems\EzPlatformContentFormsBundle; use EzSystems\EzPlatformContentFormsBundle\DependencyInjection\Compiler\FieldTypeFormMapperDispatcherPass; -use EzSystems\EzPlatformContentFormsBundle\DependencyInjection\Compiler\ViewBuilderRegistryPass; use EzSystems\EzPlatformContentFormsBundle\DependencyInjection\Configuration\Parser\ContentCreateView; use EzSystems\EzPlatformContentFormsBundle\DependencyInjection\Configuration\Parser\ContentEdit; use EzSystems\EzPlatformContentFormsBundle\DependencyInjection\Configuration\Parser\ContentEditView; @@ -23,7 +22,6 @@ public function build(ContainerBuilder $container) { parent::build($container); $container->addCompilerPass(new FieldTypeFormMapperDispatcherPass()); - $container->addCompilerPass(new ViewBuilderRegistryPass()); $eZExtension = $container->getExtension('ezpublish'); $eZExtension->addConfigParser(new ContentEdit()); diff --git a/src/bundle/Resources/config/views.yaml b/src/bundle/Resources/config/views.yaml index 18626cd4..047b3f18 100644 --- a/src/bundle/Resources/config/views.yaml +++ b/src/bundle/Resources/config/views.yaml @@ -11,6 +11,8 @@ services: - '@ezpublish.view.configurator' - '@ezpublish.view.view_parameters.injector.dispatcher' - '@ezplatform.content_forms.action_dispatcher.content' + tags: + - { name: ibexa.view_builder } EzSystems\EzPlatformContentForms\Content\View\Provider\ContentEditView\Configured: arguments: @@ -47,6 +49,8 @@ services: - '@ezpublish.view.configurator' - '@ezpublish.view.view_parameters.injector.dispatcher' - '@ezplatform.content_forms.action_dispatcher.content' + tags: + - { name: ibexa.view_builder } EzSystems\EzPlatformContentForms\Content\View\Provider\ContentCreateView\Configured: arguments: