InstallerRouteProviderLazyBuilder.php
Same filename in other branches
Namespace
Drupal\Core\InstallerFile
-
core/
lib/ Drupal/ Core/ Installer/ InstallerRouteProviderLazyBuilder.php
View source
<?php
namespace Drupal\Core\Installer;
use Drupal\Core\Routing\RouteProviderLazyBuilder;
use Symfony\Component\Routing\Route;
/**
* A Route Provider front-end for use during the installer.
*/
class InstallerRouteProviderLazyBuilder extends RouteProviderLazyBuilder {
/**
* {@inheritdoc}
*/
public function getRouteByName($name) {
if ($name === '<none>' || $name === '<front>') {
// During the installer template_preprocess_page() 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);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
InstallerRouteProviderLazyBuilder | A Route Provider front-end for use during the installer. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.