Classes, interfaces and traits
ConstantTest¶
Checks if a variable is the exact same value as a constant.
{% if post.status is constant('Post::PUBLISHED') %}
the status attribute is exactly the same as Post::PUBLISHED
{% endif %}
« More »
DivisiblebyTest¶
Checks if a variable is divisible by a number.
{% if loop.index is divisible by(3) %}
« More »
EvenTest¶
Checks if a number is even.
« More »
NullTest¶
Checks that a variable is null.
« More »
SameasTest¶
Checks if a variable is the same as another one (=== in PHP).
« More »