vendor/se7enxweb/exponential-platform-dxp-core/src/bundle/IO/IbexaIOBundle.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\IO;
  7. use Ibexa\Bundle\IO\DependencyInjection\Compiler;
  8. use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory;
  9. use Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension;
  10. use Symfony\Component\DependencyInjection\ContainerBuilder;
  11. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. class IbexaIOBundle extends Bundle
  14. {
  15. /** @var \Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension */
  16. protected $extension;
  17. public function build(ContainerBuilder $container)
  18. {
  19. $extension = $this->getContainerExtension();
  20. $container->addCompilerPass(
  21. new Compiler\IOConfigurationPass(
  22. $extension->getMetadataHandlerFactories(),
  23. $extension->getBinarydataHandlerFactories()
  24. )
  25. );
  26. $container->addCompilerPass(new Compiler\MigrationFileListerPass());
  27. parent::build($container);
  28. }
  29. public function getContainerExtension(): ?ExtensionInterface
  30. {
  31. if (!isset($this->extension)) {
  32. $this->extension = new IbexaIOExtension();
  33. $this->extension->addMetadataHandlerFactory('flysystem', new ConfigurationFactory\MetadataHandler\Flysystem());
  34. $this->extension->addMetadataHandlerFactory('legacy_dfs_cluster', new ConfigurationFactory\MetadataHandler\LegacyDFSCluster());
  35. $this->extension->addBinarydataHandlerFactory('flysystem', new ConfigurationFactory\BinarydataHandler\Flysystem());
  36. }
  37. return $this->extension;
  38. }
  39. }
  40. class_alias(IbexaIOBundle::class, 'eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle');