public function Twig_Environment::addNodeVisitor in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 vendor/Twig/Environment.php \Twig_Environment::addNodeVisitor()
Registers a Node Visitor.
Parameters
Twig_NodeVisitorInterface $visitor A Twig_NodeVisitorInterface instance:
File
- vendor/
Twig/ Environment.php, line 892
Class
- Twig_Environment
- Stores the Twig configuration.
Code
public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) {
if ($this->extensionInitialized) {
throw new LogicException('Unable to add a node visitor as extensions have already been initialized.');
}
$this->staging
->addNodeVisitor($visitor);
}