public function Profiler::add in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::add()
- 8 webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::add()
- 4.x webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::add()
File
- webprofiler/
src/ Profiler/ Profiler.php, line 53
Class
- Profiler
- Class Profiler
Namespace
Drupal\webprofiler\ProfilerCode
public function add(DataCollectorInterface $collector) {
// drupal collector should not be disabled
if ($collector
->getName() == 'drupal') {
parent::add($collector);
}
else {
if ($this->activeToolbarItems && array_key_exists($collector
->getName(), $this->activeToolbarItems) && $this->activeToolbarItems[$collector
->getName()] !== '0') {
parent::add($collector);
}
}
}