public function ThemeDataCollector::collect in Devel 8.3        
                          
                  
                        Same name and namespace in other branches
- 8 webprofiler/src/DataCollector/ThemeDataCollector.php \Drupal\webprofiler\DataCollector\ThemeDataCollector::collect()
 - 8.2 webprofiler/src/DataCollector/ThemeDataCollector.php \Drupal\webprofiler\DataCollector\ThemeDataCollector::collect()
 - 4.x webprofiler/src/DataCollector/ThemeDataCollector.php \Drupal\webprofiler\DataCollector\ThemeDataCollector::collect()
 
 
File
 
   - webprofiler/src/DataCollector/ThemeDataCollector.php, line 57
 
  
  Class
  
  - ThemeDataCollector 
 
  - Class ThemeDataCollector.
 
  Namespace
  Drupal\webprofiler\DataCollector
Code
public function collect(Request $request, Response $response, \Exception $exception = NULL) {
  $activeTheme = $this->themeManager
    ->getActiveTheme();
  $this->data['activeTheme'] = [
    'name' => $activeTheme
      ->getName(),
    'path' => $activeTheme
      ->getPath(),
    'engine' => $activeTheme
      ->getEngine(),
    'owner' => $activeTheme
      ->getOwner(),
    'baseThemes' => $activeTheme
      ->getBaseThemeExtensions(),
    'extension' => $activeTheme
      ->getExtension(),
    'styleSheetsRemove' => $activeTheme
      ->styleSheetsRemove(),
    'libraries' => $activeTheme
      ->getLibraries(),
    'regions' => $activeTheme
      ->getRegions(),
  ];
  if ($this->themeNegotiator instanceof ThemeNegotiatorWrapper) {
    $this->data['negotiator'] = [
      'class' => $this
        ->getMethodData($this->themeNegotiator
        ->getNegotiator(), 'determineActiveTheme'),
      'id' => $this->themeNegotiator
        ->getNegotiator()->_serviceId,
    ];
  }
}