class Twig_Node_Expression_Test_Defined extends Twig_Node_Expression_Test
Checks if a variable is defined in the current context.
{# defined works with variable names and variable attributes #}
{% if foo is defined %}
{# ... #}
{% endif %}
Methods
|
__construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
|
||
|
compile(Twig_Compiler $compiler)
|
Details
at line 26
public
__construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
at line 50
public
compile(Twig_Compiler $compiler)