‪TYPO3CMS  10.4
Services.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 namespace ‪TYPO3\CMS\Fluid;
5 
6 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7 use Symfony\Component\DependencyInjection\ContainerBuilder;
8 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
9 use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface;
10 
11 return function (ContainerConfigurator $container, ContainerBuilder $containerBuilder) {
12  $containerBuilder->registerForAutoconfiguration(ViewHelperInterface::class)->addTag('fluid.viewhelper');
13 
14  $containerBuilder->addCompilerPass(new class() implements CompilerPassInterface {
15  public function process(ContainerBuilder $container)
16  {
17  foreach ($container->findTaggedServiceIds('fluid.viewhelper') as $id => $tags) {
18  $container->findDefinition($id)->setPublic(true)->setShared(false);
19  }
20  }
21  });
22 };
‪TYPO3\CMS\Fluid