function ThemePreprocess::preprocessInstallPage

Prepares variables for install page templates.

Default template: install-page.html.twig.

Parameters

array $variables: An associative array containing:

  • content - An array of page content.

See also

\Drupal\Core\Theme\ThemePreprocess::preprocessMaintenancePage()

File

core/lib/Drupal/Core/Theme/ThemePreprocess.php, line 403

Class

ThemePreprocess
Preprocess for common/core theme templates.

Namespace

Drupal\Core\Theme

Code

public function preprocessInstallPage(array &$variables) : void {
  $installer_active_task = NULL;
  if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE === 'install' && InstallerKernel::installationAttempted()) {
    $installer_active_task = $GLOBALS['install_state']['active_task'];
  }
  $this->preprocessMaintenancePage($variables);
  // Override the site name that is displayed on the page, since Drupal is
  // still in the process of being installed.
  $distribution_name = drupal_install_profile_distribution_name();
  $variables['site_name'] = $distribution_name;
  $variables['site_version'] = $installer_active_task ? drupal_install_profile_distribution_version() : '';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.