Class Twig_TokenParser_For

InheritanceTwig_TokenParser_For » Twig_TokenParser
ImplementsTwig_TokenParserInterface

Loops over each item of a sequence.

    {% for user in users %}
  • {{ user.username|e }}
  • {% endfor %}

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$parser Twig_Parser Twig_TokenParser

Method Details

checkLoopUsageBody() protected method

protected void checkLoopUsageBody ( Twig_TokenStream $stream, Twig_NodeInterface $node )
$stream
$node
checkLoopUsageCondition() protected method

protected void checkLoopUsageCondition ( Twig_TokenStream $stream, Twig_NodeInterface $node )
$stream
$node
decideForEnd() public method

public void decideForEnd ( Twig_Token $token )
$token
decideForFork() public method

public void decideForFork ( Twig_Token $token )
$token
getTag() public method

public void getTag ( )
parse() public method

public void parse ( Twig_Token $token )
$token