PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.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: 357 bytes
 

Contents

Class file image Download
--TEST-- "for" tag adds a loop variable to the context --TEMPLATE-- {% for item in items %} * {{ loop.index }}/{{ loop.index0 }} * {{ loop.revindex }}/{{ loop.revindex0 }} * {{ loop.first }}/{{ loop.last }}/{{ loop.length }} {% endfor %} --DATA-- return array('items' => array('a', 'b')) --EXPECT-- * 1/0 * 2/1 * 1//2 * 2/1 * 1/0 * /1/2