[TwigBundle] tweaked a comment

This commit is contained in:
Fabien Potencier 2011-01-13 07:55:58 +01:00
parent 5ac67a23e7
commit e975a09003

View File

@ -30,7 +30,10 @@ class TwigEnvironmentPass implements CompilerPassInterface
$definition = $container->getDefinition('twig'); $definition = $container->getDefinition('twig');
// addExtension must be first // Extensions must always be registered before everything else.
// For instance, global variable definitions must be registered
// afterward. If not, the globals from the extensions will never
// be registered.
$calls = $definition->getMethodCalls(); $calls = $definition->getMethodCalls();
$definition->setMethodCalls(array()); $definition->setMethodCalls(array());
foreach ($container->findTaggedServiceIds('twig.extension') as $id => $attributes) { foreach ($container->findTaggedServiceIds('twig.extension') as $id => $attributes) {