You are here

public function Section::open in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::open()
  2. 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::open()
  3. 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\Section::open()

Creates or re-opens a child section.

Parameters

string|null $id: Null to create a new section, the identifier to re-open an existing one.

Return value

Section A child section

File

webprofiler/src/Stopwatch.php, line 220

Class

Section
@internal This class is for internal usage only

Namespace

Drupal\webprofiler

Code

public function open($id) {
  if (NULL === ($session = $this
    ->get($id))) {
    $session = $this->children[] = new self(microtime(TRUE) * 1000);
  }
  return $session;
}