PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test

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

Contents

Class file image Download
--TEST-- "macro" tag --TEMPLATE-- {% import 'forms.twig' as forms %} {{ forms.input('username') }} {{ forms.input('password', null, 'password', 1) }} --TEMPLATE(forms.twig)-- {% macro input(name, value, type, size) %} <input type="{{ type|default("text") }}" name="{{ name }}" value="{{ value|e|default('') }}" size="{{ size|default(20) }}"> {% endmacro %} --DATA-- return array() --EXPECT-- <input type="text" name="username" value="" size="20"> <input type="password" name="password" value="" size="1">