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

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 Ibexa\Bundle\Connect\DependencyInjection\Configuration\SiteAccessAware\ConnectParser;
  10. use Symfony\Component\Config\FileLocator;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
  13. use Symfony\Component\HttpKernel\Bundle\Bundle;
  14. final class IbexaConnectBundle extends Bundle
  15. {
  16. public function build(ContainerBuilder $container): void
  17. {
  18. $loader = new YamlFileLoader(
  19. $container,
  20. new FileLocator(__DIR__ . '/Resources/config')
  21. );
  22. if ($container->hasExtension('ibexa_form_builder')) {
  23. $loader->load('bridge/form_builder.yaml');
  24. }
  25. if ($container->hasExtension('ibexa_fieldtype_page')) {
  26. $loader->load('bridge/page_builder.yaml');
  27. $container->addCompilerPass(new BlockCompilerPass());
  28. }
  29. if ($container->hasExtension('ibexa_connector_ai')) {
  30. $loader->load('services/ai.yaml');
  31. }
  32. /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $ibexaExtension */
  33. $ibexaExtension = $container->getExtension('ibexa');
  34. $ibexaExtension->addConfigParser(new ConnectParser());
  35. $ibexaExtension->addDefaultSettings(__DIR__ . '/Resources/config', ['default_settings.yaml']);
  36. }
  37. }