class EnterProfileNode
Same name in this branch
- 11.x core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/EnterProfileNode.php \Drupal\sdc_other_node_visitor\Twig\Profiler\EnterProfileNode
Same name in other branches
- 10 core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/EnterProfileNode.php \Drupal\sdc_other_node_visitor\Twig\Profiler\EnterProfileNode
- 10 core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/EnterProfileNode.php \Drupal\sdc_other_node_visitor\Twig\Profiler\EnterProfileNode
Represents a profile enter node.
Hierarchy
- class \Drupal\sdc_other_node_visitor\Twig\Profiler\EnterProfileNode extends \Twig\Node\Node
Expanded class hierarchy of EnterProfileNode
2 files declare their use of EnterProfileNode
- TestNodeVisitor.php in core/
modules/ sdc/ tests/ modules/ sdc_other_node_visitor/ src/ Twig/ NodeVisitor/ TestNodeVisitor.php - TestNodeVisitor.php in core/
modules/ system/ tests/ modules/ sdc_other_node_visitor/ src/ Twig/ NodeVisitor/ TestNodeVisitor.php
File
-
core/
modules/ system/ tests/ modules/ sdc_other_node_visitor/ src/ Twig/ Profiler/ EnterProfileNode.php, line 14
Namespace
Drupal\sdc_other_node_visitor\Twig\ProfilerView source
class EnterProfileNode extends Node {
public function __construct(string $extensionName, string $varName) {
parent::__construct([], [
'extension_name' => $extensionName,
'var_name' => $varName,
]);
}
public function compile(Compiler $compiler) : void {
$compiler->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name')))
->repr($this->getAttribute('extension_name'))
->raw("];\n")
->write(sprintf('$%s->enter();', $this->getAttribute('var_name')))
->raw("\n\n");
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
EnterProfileNode::compile | public | function | |
EnterProfileNode::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.