public function PerformanceTimingDataCollector::getPanelSummary in Devel 4.x
Same name and namespace in other branches
- 8.3 webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getPanelSummary()
- 8 webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getPanelSummary()
- 8.2 webprofiler/src/DataCollector/PerformanceTimingDataCollector.php \Drupal\webprofiler\DataCollector\PerformanceTimingDataCollector::getPanelSummary()
Returns the string used in vertical tab summary.
Return value
string The panel summary.
Overrides DrupalDataCollectorInterface::getPanelSummary
File
- webprofiler/
src/ DataCollector/ PerformanceTimingDataCollector.php, line 50
Class
- PerformanceTimingDataCollector
- Collects data about frontend performance.
Namespace
Drupal\webprofiler\DataCollectorCode
public function getPanelSummary() {
if (isset($this->data['performance'])) {
$performanceData = new PerformanceTimingData($this->data['performance']);
return $this
->t('TTFB: @ttfb', [
'@ttfb' => sprintf('%.0f ms', $performanceData
->getTtfbTiming()),
]);
}
return NULL;
}