vendor/ibexa/segmentation/src/bundle/IbexaSegmentationBundle.php line 16

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\Segmentation;
  8. use Ibexa\Bundle\Segmentation\DependencyInjection\Configuration\Parser\SegmentationParser;
  9. use Ibexa\Segmentation\Permission\SegmentationPolicyProvider;
  10. use Symfony\Component\DependencyInjection\ContainerBuilder;
  11. use Symfony\Component\HttpKernel\Bundle\Bundle;
  12. final class IbexaSegmentationBundle extends Bundle
  13. {
  14.     public function build(ContainerBuilder $container)
  15.     {
  16.         parent::build($container);
  17.         /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $kernelExtension */
  18.         $kernelExtension $container->getExtension('ibexa');
  19.         $configParsers $this->getConfigParsers();
  20.         array_walk($configParsers, [$kernelExtension'addConfigParser']);
  21.         $kernelExtension->addDefaultSettings(__DIR__ '/Resources/config', ['default_settings.yaml']);
  22.         $kernelExtension->addPolicyProvider(new SegmentationPolicyProvider());
  23.     }
  24.     private function getConfigParsers(): array
  25.     {
  26.         return [
  27.             new SegmentationParser(),
  28.         ];
  29.     }
  30. }
  31. class_alias(IbexaSegmentationBundle::class, 'Ibexa\Platform\Bundle\Segmentation\IbexaPlatformSegmentationBundle');