public function SocialTourController::getCacheTags in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 8.6 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 8.7 modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 10.3.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 10.0.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 10.1.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
- 10.2.x modules/custom/social_tour/src/SocialTourController.php \Drupal\social_tour\SocialTourController::getCacheTags()
Returns tags based on tours of page.
Parameters
string $route_name: A route name.
Return value
array The cache tags.
1 call to SocialTourController::getCacheTags()
- SocialTourController::disableOnboarding in modules/
custom/ social_tour/ src/ SocialTourController.php - Disable onboarding for current_user by Ajax call.
File
- modules/
custom/ social_tour/ src/ SocialTourController.php, line 191
Class
- SocialTourController
- Class SocialTourController.
Namespace
Drupal\social_tourCode
public function getCacheTags($route_name) {
$tours = $this->entityTypeManager
->getStorage('tour')
->getQuery()
->condition('routes.*.route_name', $route_name)
->execute();
return array_map(function ($tour) {
return 'user:' . $this->currentUser
->id() . ':tour:' . $tour;
}, $tours);
}