AsseticBundle.php 2.0KB

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