ViewsData::__construct

public ViewsData::__construct(CacheBackendInterface $cache_backend, ConfigFactoryInterface $config, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager)

Constructs this ViewsData object.

Parameters

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

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

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

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

File

core/modules/views/src/ViewsData.php, line 102

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

public function __construct(CacheBackendInterface $cache_backend, ConfigFactoryInterface $config, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager) {
  $this->cacheBackend = $cache_backend;
  $this->moduleHandler = $module_handler;
  $this->languageManager = $language_manager;

  $this->langcode = $this->languageManager->getCurrentLanguage()->getId();
  $this->skipCache = $config->get('views.settings')->get('skip_cache');
}
doc_Drupal
2016-10-29 09:55:01
Comments
Leave a Comment

Please login to continue.