You are here

public function Stopwatch::getSectionEvents in Devel 8

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

Gets all events for a given section.

Parameters

string $id A section identifier:

Return value

StopwatchEvent[] An array of StopwatchEvent instances

File

webprofiler/src/Stopwatch.php, line 130

Class

Stopwatch
Class Stopwatch

Namespace

Drupal\webprofiler

Code

public function getSectionEvents($id) {
  return isset($this->sections[$id]) ? $this->sections[$id]
    ->getEvents() : [];
}