PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test

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

Contents

Class file image Download
--TEST-- block_expr2 --TEMPLATE-- {% extends "base2.twig" %} {% block element -%} Element: {{- parent() -}} {% endblock %} --TEMPLATE(base2.twig)-- {% extends "base.twig" %} --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>