AsseticBundle.php 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /*
  3. * This file is part of the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  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 Symfony\Bundle\AsseticBundle;
  11. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetFactoryPass;
  12. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetManagerPass;
  13. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
  14. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\FilterManagerPass;
  15. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckCssEmbedFilterPass;
  16. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckClosureFilterPass;
  17. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\TemplatingPass;
  18. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\SprocketsFilterPass;
  19. use Symfony\Component\DependencyInjection\ContainerBuilder;
  20. use Symfony\Component\HttpKernel\Bundle\Bundle;
  21. /**
  22. * Assetic integration.
  23. *
  24. * @author Kris Wallsmith <kris@symfony.com>
  25. */
  26. class AsseticBundle extends Bundle
  27. {
  28. public function build(ContainerBuilder $container)
  29. {
  30. parent::build($container);
  31. $container->addCompilerPass(new CheckClosureFilterPass());
  32. $container->addCompilerPass(new CheckCssEmbedFilterPass());
  33. $container->addCompilerPass(new CheckYuiFilterPass());
  34. $container->addCompilerPass(new SprocketsFilterPass());
  35. $container->addCompilerPass(new TemplatingPass());
  36. $container->addCompilerPass(new AssetFactoryPass());
  37. $container->addCompilerPass(new AssetManagerPass());
  38. $container->addCompilerPass(new FilterManagerPass());
  39. }
  40. }