public function Twig_Node_SandboxedModule::__construct

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):

integer $lineno The line number:

string $tag The tag name associated with the Node:

Overrides Twig_Node_Module::__construct

File

drupal/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php, line 25

Class

Twig_Node_SandboxedModule
Represents a module node.

Code

public function __construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions) {
  parent::__construct($node
    ->getNode('body'), $node
    ->getNode('parent'), $node
    ->getNode('blocks'), $node
    ->getNode('macros'), $node
    ->getNode('traits'), $node
    ->getAttribute('embedded_templates'), $node
    ->getAttribute('filename'), $node
    ->getLine(), $node
    ->getNodeTag());
  $this
    ->setAttribute('index', $node
    ->getAttribute('index'));
  $this->usedFilters = $usedFilters;
  $this->usedTags = $usedTags;
  $this->usedFunctions = $usedFunctions;
}