function ViewsData::clear

Same name in other branches
  1. 9 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::clear()
  2. 8.9.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::clear()
  3. 11.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::clear()

Clears the class storage and cache.

File

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

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

public function clear() {
    $this->storage = [];
    $this->allStorage = [];
    $this->fullyLoaded = FALSE;
    Cache::invalidateTags([
        'views_data',
    ]);
}

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