class Twig_Node_Expression_Filter_Default extends Twig_Node_Expression_Filter
Returns the value or the default value when it is undefined or empty.
<pre>
{{ var.foo|default('foo item on var is not defined') }}
</pre>
Methods
| __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null) | ||
| compile(Twig_Compiler $compiler) |