public function BlocksDataCollector::collect in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/DataCollector/BlocksDataCollector.php \Drupal\webprofiler\DataCollector\BlocksDataCollector::collect()
- 8.2 webprofiler/src/DataCollector/BlocksDataCollector.php \Drupal\webprofiler\DataCollector\BlocksDataCollector::collect()
- 4.x webprofiler/src/DataCollector/BlocksDataCollector.php \Drupal\webprofiler\DataCollector\BlocksDataCollector::collect()
File
- webprofiler/
src/ DataCollector/ BlocksDataCollector.php, line 40
Class
- BlocksDataCollector
- Class BlocksDataCollector
Namespace
Drupal\webprofiler\DataCollectorCode
public function collect(Request $request, Response $response, \Exception $exception = NULL) {
$storage = $this->entityManager
->getStorage('block');
$loaded = $this->entityManager
->getLoaded('config', 'block');
$rendered = $this->entityManager
->getRendered('block');
if ($loaded) {
$this->data['blocks']['loaded'] = $this
->getBlocksData($loaded, $storage);
}
if ($rendered) {
$this->data['blocks']['rendered'] = $this
->getBlocksData($rendered, $storage);
}
}