AsseticBundle.php 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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\TemplateResourcesPass;
  12. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetFactoryPass;
  13. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetManagerPass;
  14. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
  15. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\FilterManagerPass;
  16. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckCssEmbedFilterPass;
  17. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckClosureFilterPass;
  18. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\TemplatingPass;
  19. use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\SprocketsFilterPass;
  20. use Symfony\Component\DependencyInjection\ContainerBuilder;
  21. use Symfony\Component\HttpKernel\Bundle\Bundle;
  22. /**
  23. * Assetic integration.
  24. *
  25. * @author Kris Wallsmith <kris@symfony.com>
  26. */
  27. class AsseticBundle extends Bundle
  28. {
  29. public function build(ContainerBuilder $container)
  30. {
  31. parent::build($container);
  32. $container->addCompilerPass(new TemplateResourcesPass());
  33. $container->addCompilerPass(new CheckClosureFilterPass());
  34. $container->addCompilerPass(new CheckCssEmbedFilterPass());
  35. $container->addCompilerPass(new CheckYuiFilterPass());
  36. $container->addCompilerPass(new SprocketsFilterPass());
  37. $container->addCompilerPass(new TemplatingPass());
  38. $container->addCompilerPass(new AssetFactoryPass());
  39. $container->addCompilerPass(new AssetManagerPass());
  40. $container->addCompilerPass(new FilterManagerPass());
  41. }
  42. }