You are here

public function HandyCacheTagsManager::getEntityTags in Handy cache tags 8

Creates cache tags from entities.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: An entity to use.

Return value

array Array of cache tags.

File

src/HandyCacheTagsManager.php, line 26

Class

HandyCacheTagsManager
HandyCacheTagsManager service.

Namespace

Drupal\handy_cache_tags

Code

public function getEntityTags(EntityInterface $entity) {
  return [
    $this
      ->getEntityTypeTagFromEntity($entity),
    $this
      ->getBundleTagFromEntity($entity),
  ];
}