function 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;
}