PHP Classes

File: libs/Twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test

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

Contents

Class file image Download
--TEST-- block_expr --TEMPLATE-- {% extends "base.twig" %} {% block element -%} Element: {{- parent() -}} {% endblock %} --TEMPLATE(base.twig)-- {% spaceless %} {% block element -%} <div> {%- if item.children is defined %} {%- for item in item.children %} {{- block('element') -}} {% endfor %} {%- endif -%} </div> {%- endblock %} {% endspaceless %} --DATA-- return array( 'item' => array( 'children' => array( null, null, ) ) ) --EXPECT-- Element:<div>Element:<div></div>Element:<div></div></div>