function ViewsData::__construct

Same name in this branch
  1. main core/modules/content_moderation/src/ViewsData.php \Drupal\content_moderation\ViewsData::__construct()
Same name and namespace in other branches
  1. 11.x core/modules/content_moderation/src/ViewsData.php \Drupal\content_moderation\ViewsData::__construct()
  2. 11.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::__construct()
  3. 10 core/modules/content_moderation/src/ViewsData.php \Drupal\content_moderation\ViewsData::__construct()
  4. 10 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::__construct()
  5. 9 core/modules/content_moderation/src/ViewsData.php \Drupal\content_moderation\ViewsData::__construct()
  6. 9 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::__construct()
  7. 8.9.x core/modules/content_moderation/src/ViewsData.php \Drupal\content_moderation\ViewsData::__construct()
  8. 8.9.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::__construct()

File

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

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

public function __construct(#[Autowire(service: 'cache.default')] protected CacheBackendInterface $cacheBackend, protected ModuleHandlerInterface $moduleHandler, protected LanguageManagerInterface $languageManager) {
  $this->langcode = $this->languageManager
    ->getCurrentLanguage()
    ->getId();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.