@@ -52,6 +52,7 @@ public function process(ContainerBuilder $container): void
5252 'module ' => 'backend ' ,
5353 ]
5454 );
55+ $ backendController ->setPublic (true );
5556
5657 $ container ->setDefinition ('shopware_bundle.content_type.controllers.backend. ' . $ name , $ backendController );
5758
@@ -69,25 +70,28 @@ public function process(ContainerBuilder $container): void
6970 'module ' => 'api ' ,
7071 ]
7172 );
73+ $ apiController ->setPublic (true );
7274
7375 $ container ->setDefinition ('shopware_bundle.content_type.controllers.api. ' . $ name , $ apiController );
7476
7577 if ($ this ->allFrontendRequirementsMet ($ type )) {
76- $ apiController = new Definition (\Shopware \Bundle \ContentTypeBundle \Controller \Frontend \ContentType::class);
77- $ apiController ->setArguments ([
78+ $ frontendController = new Definition (\Shopware \Bundle \ContentTypeBundle \Controller \Frontend \ContentType::class);
79+ $ frontendController ->setArguments ([
7880 new Reference ('shopware.bundle.content_type. ' . $ name ),
7981 new Expression ('service("Shopware \\\\Bundle \\\\ContentTypeBundle \\\\Services \\\\FrontendTypeTranslatorInterface").translate(service("Shopware \\\\Bundle \\\\ContentTypeBundle \\\\Services \\\\TypeProvider").getType(" ' . $ name . '")) ' ),
8082 ]);
8183
82- $ apiController ->addTag (
84+ $ frontendController ->addTag (
8385 'shopware.controller ' ,
8486 [
8587 'controller ' => 'Custom ' . ucfirst ($ name ),
8688 'module ' => 'frontend ' ,
8789 ]
8890 );
8991
90- $ container ->setDefinition ('shopware_bundle.content_type.controllers.frontend. ' . $ name , $ apiController );
92+ $ frontendController ->setPublic (true );
93+
94+ $ container ->setDefinition ('shopware_bundle.content_type.controllers.frontend. ' . $ name , $ frontendController );
9195 }
9296 }
9397 }
0 commit comments