class Twig_Node_Expression_Test_Constant extends Twig_Node_Expression_Test
Checks if a variable is the exact same value as a constant.
<pre>
{% if post.status is constant('Post::PUBLISHED') %}
the status attribute is exactly the same as Post::PUBLISHED
{% endif %}
</pre>
Methods
| __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno) | from Twig_Node_Expression_Test | |
| compile(Twig_Compiler $compiler) |