Twig_Node_Expression_Test_Odd

Checks if a number is odd.

Defined (1)

The class is defined in the following location(s).

/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php  
  1. class Twig_Node_Expression_Test_Odd extends Twig_Node_Expression_Test 
  2. public function compile(Twig_Compiler $compiler) 
  3. $compiler 
  4. ->raw('(') 
  5. ->subcompile($this->getNode('node')) 
  6. ->raw(' % 2 == 1') 
  7. ->raw(')')