function RouteProvider::getCurrentLanguageCacheIdPart
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getCurrentLanguageCacheIdPart()
- 10 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getCurrentLanguageCacheIdPart()
- 11.x core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::getCurrentLanguageCacheIdPart()
Returns the language identifier for the route collection cache.
Return value
string The language identifier.
1 call to RouteProvider::getCurrentLanguageCacheIdPart()
- RouteProvider::getRouteCollectionCacheId in core/
lib/ Drupal/ Core/ Routing/ RouteProvider.php - Returns the cache ID for the route collection cache.
File
-
core/
lib/ Drupal/ Core/ Routing/ RouteProvider.php, line 524
Class
- RouteProvider
- A Route Provider front-end for all Drupal-stored routes.
Namespace
Drupal\Core\RoutingCode
protected function getCurrentLanguageCacheIdPart() {
// This must be in sync with the language logic in
// \Drupal\path_alias\PathProcessor\AliasPathProcessor::processInbound() and
// \Drupal\path_alias\AliasManager::getPathByAlias().
// @todo Update this if necessary in https://www.drupal.org/node/1125428.
return $this->languageManager
->getCurrentLanguage(LanguageInterface::TYPE_URL)
->getId();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.