PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 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