Class Twig_TokenParser_If

InheritanceTwig_TokenParser_If » Twig_TokenParser
ImplementsTwig_TokenParserInterface

Tests a condition.

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

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$parser Twig_Parser Twig_TokenParser

Method Details

decideIfEnd() public method

public void decideIfEnd ( Twig_Token $token )
$token
decideIfFork() public method

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

public void getTag ( )
parse() public method

public void parse ( Twig_Token $token )
$token