PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test   Download  
File: libs/Twig/test/Twig/Tests/Fixtures/tags/for/loop_context.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: 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