Defines a macro.
<pre> {% macro input(name, value, type, size) %} <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" /> {% endmacro %} </pre>
Expanded class hierarchy of Twig_TokenParser_Macro
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Twig_TokenParser:: |
protected | property | ||
Twig_TokenParser:: |
public | function |
Sets the parser associated with this token parser Overrides Twig_TokenParserInterface:: |
|
Twig_TokenParser_Macro:: |
public | function | ||
Twig_TokenParser_Macro:: |
public | function |
Gets the tag name associated with this token parser. Overrides Twig_TokenParserInterface:: |
|
Twig_TokenParser_Macro:: |
public | function |
Parses a token and returns a node. Overrides Twig_TokenParserInterface:: |