public function TwigNodeTrans::__construct
public TwigNodeTrans::__construct(\Twig_Node $body, \Twig_Node $plural = NULL, \Twig_Node_Expression $count = NULL, \Twig_Node_Expression $options = NULL, $lineno, $tag = NULL)
Constructor.
The nodes are automatically made available as properties ($this->node). The attributes are automatically made available as array items ($this['name']).
Parameters
array $nodes An array of named nodes:
array $attributes An array of attributes (should not be nodes):
int $lineno The line number:
string $tag The tag name associated with the Node:
Overrides Twig_Node::__construct
File
- core/lib/Drupal/Core/Template/TwigNodeTrans.php, line 20
Class
- TwigNodeTrans
- A class that defines the Twig 'trans' tag for Drupal.
Namespace
Drupal\Core\TemplateCode
public function __construct(\Twig_Node $body, \Twig_Node $plural = NULL, \Twig_Node_Expression $count = NULL, \Twig_Node_Expression $options = NULL, $lineno, $tag = NULL) { parent::__construct(array( 'count' => $count, 'body' => $body, 'plural' => $plural, 'options' => $options, ), array(), $lineno, $tag); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!TwigNodeTrans.php/function/TwigNodeTrans::__construct/8.1.x