public function ViewsData::__construct

Constructs this ViewsData object.

Parameters

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend to use.

\Drupal\Core\Config\ConfigFactory $config: The configuration factory object to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler class to use for invoking hooks.

File

drupal/core/modules/views/lib/Drupal/views/ViewsData.php, line 84
Contains \Drupal\views\ViewsData.

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

public function __construct(CacheBackendInterface $cache_backend, ConfigFactory $config, ModuleHandlerInterface $module_handler) {
  $this->cacheBackend = $cache_backend;
  $this->moduleHandler = $module_handler;
  $this->langcode = language(Language::TYPE_INTERFACE)->langcode;
  $this->skipCache = $config
    ->get('views.settings')
    ->get('skip_cache');
}