You are here

public function ThemeDataCollector::getData in Devel 8.2

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

Return value

array

Overrides DrupalDataCollectorInterface::getData

File

webprofiler/src/DataCollector/ThemeDataCollector.php, line 176

Class

ThemeDataCollector
Class ThemeDataCollector

Namespace

Drupal\webprofiler\DataCollector

Code

public function getData() {
  $data = $this->data;
  $data['twig'] = [
    'callgraph' => (string) $this
      ->getHtmlCallGraph(),
    'render_time' => $this
      ->getTime(),
    'template_count' => $this
      ->getTemplateCount(),
    'templates' => $this
      ->getTemplates(),
    'block_count' => $this
      ->getBlockCount(),
    'macro_count' => $this
      ->getMacroCount(),
  ];
  return $data;
}