TwigNodeVisitor

Provides a Twig_NodeVisitor to change the generated parse-tree.

This is used to ensure that everything printed is wrapped via the TwigExtension->renderVar() function in order to just write {{ content }} in templates instead of having to write {{ render_var(content) }}.

Hierarchy

  • class \Twig_BaseNodeVisitor implements \Twig_NodeVisitorInterface

See also

twig_render

File

core/lib/Drupal/Core/Template/TwigNodeVisitor.php, line 14

Namespace

Drupal\Core\Template

Members

Name Modifiers Type Description
TwigNodeVisitor::doEnterNode protected function Called before child nodes are visited. Overrides Twig_BaseNodeVisitor::doEnterNode
TwigNodeVisitor::doLeaveNode protected function Called after child nodes are visited. Overrides Twig_BaseNodeVisitor::doLeaveNode
TwigNodeVisitor::getPriority public function
Twig_BaseNodeVisitor::enterNode final public function
Twig_BaseNodeVisitor::leaveNode final public function
doc_Drupal
2016-10-29 09:49:44
Comments
Leave a Comment

Please login to continue.