public function EventInviteLocalTask::getCacheTags in Open Social 8.9
Same name and namespace in other branches
- 10.3.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Menu/LocalTask/EventInviteLocalTask.php \Drupal\social_event_invite\Plugin\Menu\LocalTask\EventInviteLocalTask::getCacheTags()
- 10.0.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Menu/LocalTask/EventInviteLocalTask.php \Drupal\social_event_invite\Plugin\Menu\LocalTask\EventInviteLocalTask::getCacheTags()
- 10.1.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Menu/LocalTask/EventInviteLocalTask.php \Drupal\social_event_invite\Plugin\Menu\LocalTask\EventInviteLocalTask::getCacheTags()
- 10.2.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Menu/LocalTask/EventInviteLocalTask.php \Drupal\social_event_invite\Plugin\Menu\LocalTask\EventInviteLocalTask::getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
Return value
string[] A set of cache tags.
Overrides LocalTaskDefault::getCacheTags
File
- modules/
social_features/ social_event/ modules/ social_event_invite/ src/ Plugin/ Menu/ LocalTask/ EventInviteLocalTask.php, line 75
Class
- EventInviteLocalTask
- Provides a local task that shows the amount of group invites.
Namespace
Drupal\social_event_invite\Plugin\Menu\LocalTaskCode
public function getCacheTags() {
$tags = [];
$user = $this->routeMatch
->getParameter('user');
// Add cache tags for event invite.
if ($user instanceof UserInterface) {
$tags[] = 'event_content_list:entity:' . $user
->id();
}
if (is_string($user)) {
$tags[] = 'event_content_list:entity:' . $user;
}
return Cache::mergeTags(parent::getCacheTags(), $tags);
}