RefinableCacheableDependencyTrait::addCacheTags

public RefinableCacheableDependencyTrait::addCacheTags(array $cache_tags)

Adds cache tags.

Parameters

string[] $cache_tags: The cache tags to be added.

Return value

$this

Overrides RefinableCacheableDependencyInterface::addCacheTags

File

core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 81

Class

RefinableCacheableDependencyTrait
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.

Namespace

Drupal\Core\Cache

Code

public function addCacheTags(array $cache_tags) {
  if ($cache_tags) {
    $this->cacheTags = Cache::mergeTags($this->cacheTags, $cache_tags);
  }
  return $this;
}
doc_Drupal
2016-10-29 09:36:59
Comments
Leave a Comment

Please login to continue.