protected function Twig_NodeVisitor_Optimizer::addLoopToAll in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php \Twig_NodeVisitor_Optimizer::addLoopToAll()
1 call to Twig_NodeVisitor_Optimizer::addLoopToAll()
- Twig_NodeVisitor_Optimizer::enterOptimizeFor in vendor/
twig/ twig/ lib/ Twig/ NodeVisitor/ Optimizer.php - Optimizes "for" tag by removing the "loop" variable creation whenever possible.
File
- vendor/
twig/ twig/ lib/ Twig/ NodeVisitor/ Optimizer.php, line 257
Class
- Twig_NodeVisitor_Optimizer
- Twig_NodeVisitor_Optimizer tries to optimizes the AST.
Code
protected function addLoopToAll() {
foreach ($this->loops as $loop) {
$loop
->setAttribute('with_loop', true);
}
}