private function initViewer(): void
{ $this->viewer ??= Services::
renderer();
} /**
* Child classes should implement this to return the timeline data
* formatted for correct usage.
*/
protected function formatTimelineData(): array
{ $this->
initViewer();
$data =
[];
$rows =
$this->viewer->
getPerformanceData();
foreach ($rows as $info) { $data[] =
[ 'name' => 'View: ' .
$info['view'
],
'component' => 'Views',
'start' =>
$info['start'
],
'duration' =>
$info['end'
] -
$info['start'
],
];