You are here

public function CExtDisablingNodeVisitor::enterNode in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/TemplateTest.php \CExtDisablingNodeVisitor::enterNode()

Called before child nodes are visited.

Parameters

Twig_NodeInterface $node The node to visit:

Twig_Environment $env The Twig environment instance:

Return value

Twig_NodeInterface The modified node

Overrides Twig_NodeVisitorInterface::enterNode

File

vendor/twig/twig/test/Twig/Tests/TemplateTest.php, line 675

Class

CExtDisablingNodeVisitor

Code

public function enterNode(Twig_NodeInterface $node, Twig_Environment $env) {
  if ($node instanceof Twig_Node_Expression_GetAttr) {
    $node
      ->setAttribute('disable_c_ext', true);
  }
  return $node;
}