public function Twig_Node_SandboxedModule::__construct in Translation template extractor 6.3
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_Module::__construct
File
- vendor/
Twig/ Node/ SandboxedModule.php, line 24
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'));
$this
->setAttribute('index', $node
->getAttribute('index'));
$this->usedFilters = $usedFilters;
$this->usedTags = $usedTags;
$this->usedFunctions = $usedFunctions;
}