PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 375 bytes
 

Contents

Class file image Download
--TEST-- "filter" tag applies the filter on "if" tags --TEMPLATE-- {% filter upper %} {% if items %} {{ items|join(', ') }} {% endif %} {% if items.3 is defined %} FOO {% else %} {{ items.1 }} {% endif %} {% if items.3 is defined %} FOO {% elseif items.1 %} {{ items.0 }} {% endif %} {% endfilter %} --DATA-- return array('items' => array('a', 'b')) --EXPECT-- A, B B A