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

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\PersistenceBundle\PersistenceBundleTrait;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. class SuluMediaBundle extends Bundle
  19. {
  20.     use PersistenceBundleTrait;
  21.     public function build(ContainerBuilder $container)
  22.     {
  23.         $this->buildPersistence(
  24.             [
  25.                 'Sulu\Bundle\MediaBundle\Entity\MediaInterface' => 'sulu.model.media.class',
  26.             ],
  27.             $container
  28.         );
  29.         $container->addCompilerPass(new FormatCacheClearerCompilerPass());
  30.         $container->addCompilerPass(new ImageFormatCompilerPass());
  31.         $container->addCompilerPass(new ImageTransformationCompilerPass());
  32.         $container->addCompilerPass(new S3ClientCompilerPass());
  33.         parent::build($container);
  34.     }
  35. }