public function EventAnEnrollCacheContext::getContext in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_an_enroll/src/EventAnEnrollCacheContext.php \Drupal\social_event_an_enroll\EventAnEnrollCacheContext::getContext()
- 8.8 modules/social_features/social_event/modules/social_event_an_enroll/src/EventAnEnrollCacheContext.php \Drupal\social_event_an_enroll\EventAnEnrollCacheContext::getContext()
- 10.0.x modules/social_features/social_event/modules/social_event_an_enroll/src/EventAnEnrollCacheContext.php \Drupal\social_event_an_enroll\EventAnEnrollCacheContext::getContext()
- 10.1.x modules/social_features/social_event/modules/social_event_an_enroll/src/EventAnEnrollCacheContext.php \Drupal\social_event_an_enroll\EventAnEnrollCacheContext::getContext()
- 10.2.x modules/social_features/social_event/modules/social_event_an_enroll/src/EventAnEnrollCacheContext.php \Drupal\social_event_an_enroll\EventAnEnrollCacheContext::getContext()
Returns the string representation of the cache context.
A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method.
Return value
string The string representation of the cache context.
Overrides CacheContextInterface::getContext
File
- modules/
social_features/ social_event/ modules/ social_event_an_enroll/ src/ EventAnEnrollCacheContext.php, line 41
Class
- EventAnEnrollCacheContext
- Defines a class for a anonymous event enrollment route context.
Namespace
Drupal\social_event_an_enrollCode
public function getContext() {
return ($route = $this->routeMatch
->getRouteObject()) && $route
->getOption('_event_an_enroll_route') ?: FALSE;
}