You are here

public function Profiler::__construct in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::__construct()
  2. 8.2 webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::__construct()
  3. 4.x webprofiler/src/Profiler/Profiler.php \Drupal\webprofiler\Profiler\Profiler::__construct()

Constructor.

Parameters

\Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface $storage: A ProfilerStorageInterface instance

\Psr\Log\LoggerInterface $logger: A LoggerInterface instance

\Drupal\Core\Config\ConfigFactoryInterface $config:

File

webprofiler/src/Profiler/Profiler.php, line 39

Class

Profiler
Class Profiler

Namespace

Drupal\webprofiler\Profiler

Code

public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = NULL, ConfigFactoryInterface $config) {
  parent::__construct($storage, $logger);
  $this->localStorage = $storage;
  $this->localLogger = $logger;
  $this->config = $config;
  $this->activeToolbarItems = $this->config
    ->get('webprofiler.config')
    ->get('active_toolbar_items');
}