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