function EntityField::getCacheTags

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::getCacheTags()
  2. 8.9.x core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::getCacheTags()
  3. 11.x core/modules/views/src/Plugin/views/field/EntityField.php \Drupal\views\Plugin\views\field\EntityField::getCacheTags()

Overrides CacheableDependencyInterface::getCacheTags

File

core/modules/views/src/Plugin/views/field/EntityField.php, line 1082

Class

EntityField
A field that displays entity field data.

Namespace

Drupal\views\Plugin\views\field

Code

public function getCacheTags() {
    $field_definition = $this->getFieldDefinition();
    $field_storage_definition = $this->getFieldStorageDefinition();
    return Cache::mergeTags($field_definition instanceof CacheableDependencyInterface ? $field_definition->getCacheTags() : [], $field_storage_definition instanceof CacheableDependencyInterface ? $field_storage_definition->getCacheTags() : []);
}

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