function ComponentNegotiator::generateCacheKey
Same name in this branch
- 10 core/modules/sdc/src/ComponentNegotiator.php \Drupal\sdc\ComponentNegotiator::generateCacheKey()
Same name in other branches
- 11.x core/modules/sdc/src/ComponentNegotiator.php \Drupal\sdc\ComponentNegotiator::generateCacheKey()
- 11.x core/lib/Drupal/Core/Theme/ComponentNegotiator.php \Drupal\Core\Theme\ComponentNegotiator::generateCacheKey()
Generates the cache key for the current theme and the provided component.
Parameters
string $component_id: The component ID.
Return value
string The cache key.
1 call to ComponentNegotiator::generateCacheKey()
- ComponentNegotiator::negotiate in core/
lib/ Drupal/ Core/ Theme/ ComponentNegotiator.php - Negotiates the active component for the current request.
File
-
core/
lib/ Drupal/ Core/ Theme/ ComponentNegotiator.php, line 158
Class
- ComponentNegotiator
- Determines which component should be used.
Namespace
Drupal\Core\ThemeCode
private function generateCacheKey(string $component_id) : string {
return sprintf('component-negotiation::%s::%s', $component_id, $this->themeManager
->getActiveTheme()
->getName());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.