dev-master
9999999-devSome twig extensions
MIT
The Requires
- php >=5.4
The Development Requires
v1.0
1.0.0.0Some twig extensions
MIT
The Requires
- php >=5.4
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Some twig extensions
Some helpful twig extensions., (*1)
[!IMPORTANT]
This repository is no longer maintained and may be removed in a near future. You may consider forking it., (*2)
composer install bentools/twig-extensions
Provides basic PHP functions allowing to work with a variable type., (*3)
{# Filters #}
{{ value | typeOf }}
{{ value | getType }}
{# Functions #}
{% if get_type(value) == 'array' %}
...
{% endif %}
{% if is_bool(value) %}
...
{% endif %}
{% if is_string(value) %}
...
{% endif %}
{% if is_numeric(value) %}
...
{% endif %}
{% if is_int(value) %}
...
{% endif %}
{% if is_float(value) %}
...
{% endif %}
{% if is_null(value) %}
...
{% endif %}
{% if is_array(value) %}
...
{% endif %}
{% if is_object(value) %}
...
{% endif %}
{% if is_scalar(value) %}
...
{% endif %}
{% if is_callable(value) %}
...
{% endif %}
Some twig extensions
MIT
Some twig extensions
MIT