* {% if loop.index is divisible by(3) %} * * * @author Fabien Potencier */ class Twig_Node_Expression_Test_Divisibleby extends Twig_Node_Expression_Test { public function compile(Twig_Compiler $compiler) { $compiler ->raw('(0 == ') ->subcompile($this->getNode('node')) ->raw(' % ') ->subcompile($this->getNode('arguments')->getNode(0)) ->raw(')') ; } }