vendor/ibexa/connect/src/bundle/IbexaConnectBundle.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3.  * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4.  * @license For full copyright and license information view LICENSE file distributed with this source code.
  5.  */
  6. declare(strict_types=1);
  7. namespace Ibexa\Bundle\Connect;
  8. use Ibexa\Bundle\Connect\DependencyInjection\Compiler\BlockCompilerPass;
  9. use Symfony\Component\Config\FileLocator;
  10. use Symfony\Component\DependencyInjection\ContainerBuilder;
  11. use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. final class IbexaConnectBundle extends Bundle
  14. {
  15.     public function build(ContainerBuilder $container): void
  16.     {
  17.         $loader = new YamlFileLoader(
  18.             $container,
  19.             new FileLocator(__DIR__ '/Resources/config')
  20.         );
  21.         if ($container->hasExtension('ibexa_form_builder')) {
  22.             $loader->load('bridge/form_builder.yaml');
  23.         }
  24.         if ($container->hasExtension('ibexa_fieldtype_page')) {
  25.             $loader->load('bridge/page_builder.yaml');
  26.             $container->addCompilerPass(new BlockCompilerPass());
  27.         }
  28.     }
  29. }