2017 © Pedro Peláez
 

library twig-extensions

Some twig extensions

image

bentools/twig-extensions

Some twig extensions

  • Tuesday, April 5, 2016
  • by bpolaszek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

BenToolsTwigExtensions

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)

Installation

composer install bentools/twig-extensions

TypeOfExtension

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 %}

The Versions

05/04 2016

dev-master

9999999-dev

Some twig extensions

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

05/04 2016

v1.0

1.0.0.0

Some twig extensions

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires