PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test

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

Contents

Class file image Download
--TEST-- "batch" filter --TEMPLATE-- <table> {% for row in items|batch(3, '') %} <tr> {% for column in row %} <td>{{ column }}</td> {% endfor %} </tr> {% endfor %} </table> --DATA-- return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) --EXPECT-- <table> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> <tr> <td>d</td> <td>e</td> <td>f</td> </tr> <tr> <td>g</td> <td>h</td> <td>i</td> </tr> <tr> <td>j</td> <td></td> <td></td> </tr> </table>