You are here

public function Section::get in Devel 8.2

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

Returns the child section.

Parameters

string $id The child section identifier:

Return value

Section|null The child section or null when none found

1 call to Section::get()
Section::open in webprofiler/src/Stopwatch.php
Creates or re-opens a child section.

File

webprofiler/src/Stopwatch.php, line 178

Class

Section
@internal This class is for internal usage only

Namespace

Drupal\webprofiler

Code

public function get($id) {
  foreach ($this->children as $child) {
    if ($id === $child
      ->getId()) {
      return $child;
    }
  }
  return NULL;
}