vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/SuluMediaBundle.php line 24

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Bundle\MediaBundle;
  11. use Sulu\Bundle\MediaBundle\DependencyInjection\FormatCacheClearerCompilerPass;
  12. use Sulu\Bundle\MediaBundle\DependencyInjection\ImageFormatCompilerPass;
  13. use Sulu\Bundle\MediaBundle\DependencyInjection\ImageTransformationCompilerPass;
  14. use Sulu\Bundle\MediaBundle\DependencyInjection\S3ClientCompilerPass;
  15. use Sulu\Bundle\MediaBundle\Entity\CollectionInterface;
  16. use Sulu\Bundle\MediaBundle\Entity\MediaInterface;
  17. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  18. use Symfony\Component\DependencyInjection\ContainerBuilder;
  19. use Symfony\Component\HttpKernel\Bundle\Bundle;
  20. class SuluMediaBundle extends Bundle
  21. {
  22.     use PersistenceBundleTrait;
  23.     public function build(ContainerBuilder $container)
  24.     {
  25.         $this->buildPersistence(
  26.             [
  27.                 MediaInterface::class => 'sulu.model.media.class',
  28.                 CollectionInterface::class => 'sulu.model.collection.class',
  29.             ],
  30.             $container
  31.         );
  32.         $container->addCompilerPass(new FormatCacheClearerCompilerPass());
  33.         $container->addCompilerPass(new ImageFormatCompilerPass());
  34.         $container->addCompilerPass(new ImageTransformationCompilerPass());
  35.         $container->addCompilerPass(new S3ClientCompilerPass());
  36.         parent::build($container);
  37.     }
  38. }