function InstallerRouteProviderLazyBuilder::getRouteByName
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Installer/InstallerRouteProviderLazyBuilder.php \Drupal\Core\Installer\InstallerRouteProviderLazyBuilder::getRouteByName()
- 10 core/lib/Drupal/Core/Installer/InstallerRouteProviderLazyBuilder.php \Drupal\Core\Installer\InstallerRouteProviderLazyBuilder::getRouteByName()
- 9 core/lib/Drupal/Core/Installer/InstallerRouteProviderLazyBuilder.php \Drupal\Core\Installer\InstallerRouteProviderLazyBuilder::getRouteByName()
Overrides RouteProviderLazyBuilder::getRouteByName
File
-
core/
lib/ Drupal/ Core/ Installer/ InstallerRouteProviderLazyBuilder.php, line 16
Class
- InstallerRouteProviderLazyBuilder
- A Route Provider front-end for use during the installer.
Namespace
Drupal\Core\InstallerCode
public function getRouteByName($name) {
if ($name === '<none>' || $name === '<front>') {
// During the installer
// \Drupal\Core\Theme\ThemePreprocess::preprocessPage() uses the routing
// system to determine the front page. At this point building the router
// for this is unnecessary work.
return new Route('/');
}
return parent::getRouteByName($name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.