\Twig_TokenParser_For
Loops over each item of a sequence.
<pre>
<ul>
{% for user in users %}
<li>{{ user.username|e }}</li>
{% endfor %}
</ul>
</pre>
Synopsis
class Twig_TokenParser_For
extends Twig_TokenParser
{
- // Inherited members from Twig_TokenParser
- protected Twig_Parser $parser;
- // methods
- public Twig_NodeInterface parse()
- public void decideForFork()
- public void decideForEnd()
- protected void checkLoopUsageCondition()
- protected void checkLoopUsageBody()
- public string getTag()
- // Inherited methods from Twig_TokenParser
- public void setParser()
Hierarchy
Extends
Members
protected
- $parser — Twig_Parser
Methods
protected
public
- decideForEnd()
- decideForFork()
- getTag() — Gets the tag name associated with this token parser.
- parse() — Parses a token and returns a node.
Inherited from Twig_TokenParser
public
- setParser() — Sets the parser associated with this token parser