class LeaveProfileNode

Same name in this branch
  1. 10 core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/LeaveProfileNode.php \Drupal\sdc_other_node_visitor\Twig\Profiler\LeaveProfileNode
Same name and namespace in other branches
  1. 11.x core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/LeaveProfileNode.php \Drupal\sdc_other_node_visitor\Twig\Profiler\LeaveProfileNode
  2. 11.x 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.

Attributes

#[YieldReady]

Hierarchy

  • class \Drupal\sdc_other_node_visitor\Twig\Profiler\LeaveProfileNode implements \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/system/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/LeaveProfileNode.php, line 12

Namespace

Drupal\sdc_other_node_visitor\Twig\Profiler
View 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.