Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InstallerRouteProviderLazyBuilder.php

function 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\Installer

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal