You are here

public static function ScheduledTransitionsUtility::createScheduledTransitionsCacheTag in Scheduled Transitions 8

Same name and namespace in other branches
  1. 2.x src/ScheduledTransitionsUtility.php \Drupal\scheduled_transitions\ScheduledTransitionsUtility::createScheduledTransitionsCacheTag()

Creates a cache tag for scheduled transitions related to an entity.

Parameters

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

Return value

string Cache tag to add to lists showing scheduled transitions for an entity.

3 calls to ScheduledTransitionsUtility::createScheduledTransitionsCacheTag()
ScheduledTransition::getCacheTagsToInvalidate in src/Entity/ScheduledTransition.php
Returns the cache tags that should be used to invalidate caches.
ScheduledTransition::invalidateTagsOnSave in src/Entity/ScheduledTransition.php
Invalidates an entity's cache tags upon save.
ScheduledTransitionsLocalTask::getCacheTags in src/Plugin/Menu/LocalTask/ScheduledTransitionsLocalTask.php
The cache tags associated with this object.

File

src/ScheduledTransitionsUtility.php, line 152

Class

ScheduledTransitionsUtility
Utilities for Scheduled Transitions module.

Namespace

Drupal\scheduled_transitions

Code

public static function createScheduledTransitionsCacheTag(EntityInterface $entity) : string {
  return sprintf('scheduled_transitions_for:%s:%s', $entity
    ->getEntityTypeId(), $entity
    ->id());
}