vendor/ibexa/measurement/src/bundle/IbexaMeasurementBundle.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\Measurement;
  8. use Ibexa\Bundle\Measurement\DependencyInjection\Configuration\Parser\MeasurementConfigParser;
  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 IbexaMeasurementBundle extends Bundle
  14. {
  15. public function build(ContainerBuilder $container): void
  16. {
  17. /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $core */
  18. $core = $container->getExtension('ibexa');
  19. $core->addConfigParser(new MeasurementConfigParser());
  20. $loader = new YamlFileLoader(
  21. $container,
  22. new FileLocator(__DIR__ . '/Resources/config')
  23. );
  24. if ($container->hasExtension('ibexa_solr')) {
  25. $loader->load('services/search/solr.yaml');
  26. }
  27. if ($container->hasExtension('ibexa_elasticsearch')) {
  28. $loader->load('services/search/elasticsearch.yaml');
  29. }
  30. if ($container->hasExtension('ibexa_cdp')) {
  31. $loader->load('services/cdp/data_export.yaml');
  32. }
  33. }
  34. }