vendor/ibexa/workflow/src/bundle/IbexaWorkflowBundle.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. namespace Ibexa\Bundle\Workflow;
  7. use Ibexa\Bundle\Workflow\DependencyInjection\Compiler\SearchPass;
  8. use Ibexa\Bundle\Workflow\DependencyInjection\Configuration\Parser\WorkflowParser;
  9. use Ibexa\Workflow\Security\WorkflowPolicyProvider;
  10. use Symfony\Component\Console\Application;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. class IbexaWorkflowBundle extends Bundle
  14. {
  15. public function build(ContainerBuilder $container)
  16. {
  17. parent::build($container);
  18. $container->addCompilerPass(new SearchPass());
  19. /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension $kernelExtension */
  20. $kernelExtension = $container->getExtension('ibexa');
  21. $kernelExtension->addPolicyProvider(new WorkflowPolicyProvider());
  22. $configParsers = $this->getConfigParsers();
  23. array_walk($configParsers, [$kernelExtension, 'addConfigParser']);
  24. $kernelExtension->addDefaultSettings(__DIR__ . '/Resources/config', ['default_settings.yaml']);
  25. }
  26. private function getConfigParsers(): array
  27. {
  28. return [
  29. new WorkflowParser(),
  30. ];
  31. }
  32. public function registerCommands(Application $application)
  33. {
  34. }
  35. }
  36. class_alias(IbexaWorkflowBundle::class, 'EzSystems\EzPlatformWorkflowBundle\EzPlatformWorkflowBundle');