function TestNodeVisitor::__construct

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/NodeVisitor/TestNodeVisitor.php \Drupal\sdc_other_node_visitor\Twig\NodeVisitor\TestNodeVisitor::__construct()
  2. main core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/NodeVisitor/TestNodeVisitor.php \Drupal\sdc_other_node_visitor\Twig\NodeVisitor\TestNodeVisitor::__construct()

TestNodeVisitor constructor.

Parameters

string $extensionName: The name of the extension.

File

core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/NodeVisitor/TestNodeVisitor.php, line 30

Class

TestNodeVisitor
A node visitor that adds nodes to the Twig template.

Namespace

Drupal\sdc_other_node_visitor\Twig\NodeVisitor

Code

public function __construct(string $extensionName) {
  $this->extensionName = $extensionName;
  $this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.