function ComponentNegotiator::generateCacheKey
Same name in this branch
- 10 core/lib/Drupal/Core/Theme/ComponentNegotiator.php \Drupal\Core\Theme\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/
modules/ sdc/ src/ ComponentNegotiator.php - Negotiates the active component for the current request.
File
-
core/
modules/ sdc/ src/ ComponentNegotiator.php, line 170
Class
- ComponentNegotiator
- Determines which component should be used.
Namespace
Drupal\sdcCode
private function generateCacheKey(string $component_id) : string {
return sprintf('sdc-negotiation::%s::%s', $component_id, $this->activeTheme
->getName());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.