function ViewsData::prepareCid

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

Prepares the cache ID by appending a language code.

Parameters

string $cid: The cache ID to prepare.

Return value

string The prepared cache ID.

4 calls to ViewsData::prepareCid()
ViewsData::cacheGet in core/modules/views/src/ViewsData.php
Gets data from the cache backend.
ViewsData::cacheSet in core/modules/views/src/ViewsData.php
Sets data to the cache backend.
ViewsData::get in core/modules/views/src/ViewsData.php
Gets data for a particular table.
ViewsData::getData in core/modules/views/src/ViewsData.php
Gets all data invoked by hook_views_data().

File

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

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

protected function prepareCid($cid) {
  return $cid . ':' . $this->langcode;
}

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