You are here

final public static function ProfilerStorageFactory::getProfilerStorage in Devel 8

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

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config:

\Symfony\Component\DependencyInjection\ContainerInterface $container:

Return value

\Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface

1 string reference to 'ProfilerStorageFactory::getProfilerStorage'
webprofiler.services.yml in webprofiler/webprofiler.services.yml
webprofiler/webprofiler.services.yml

File

webprofiler/src/Profiler/ProfilerStorageFactory.php, line 19

Class

ProfilerStorageFactory
Class ProfilerStorageFactory

Namespace

Drupal\webprofiler\Profiler

Code

public static final function getProfilerStorage(ConfigFactoryInterface $config, ContainerInterface $container) {
  $storage = $config
    ->get('webprofiler.config')
    ->get('storage') ?: 'profiler.database_storage';
  return $container
    ->get($storage);
}