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\Template

Code

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);
}
doc_Drupal
2016-10-29 09:49:44
Comments
Leave a Comment

Please login to continue.