class Twig_TokenParser_Macro

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>

Hierarchy

Expanded class hierarchy of Twig_TokenParser_Macro

File

drupal/core/vendor/twig/twig/lib/Twig/TokenParser/Macro.php, line 21

View source

Members

Namesort descending Modifiers Type Description Overrides
Twig_TokenParser::$parser protected property
Twig_TokenParser::setParser public function Sets the parser associated with this token parser Overrides Twig_TokenParserInterface::setParser
Twig_TokenParser_Macro::decideBlockEnd public function
Twig_TokenParser_Macro::getTag public function Gets the tag name associated with this token parser. Overrides Twig_TokenParserInterface::getTag
Twig_TokenParser_Macro::parse public function Parses a token and returns a node. Overrides Twig_TokenParserInterface::parse