public static function SiteSettingsForm::getDatabaseErrorsTemplate in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php \Drupal\Core\Installer\Form\SiteSettingsForm::getDatabaseErrorsTemplate()
Gets the inline template render array to display the database errors.
Parameters
\Drupal\Core\StringTranslation\TranslatableMarkup[] $errors: The database errors to list.
Return value
mixed[] The inline template render array to display the database errors.
2 calls to SiteSettingsForm::getDatabaseErrorsTemplate()
- install_check_requirements in core/includes/ install.core.inc 
- Checks installation requirements and reports any errors.
- SiteSettingsForm::getDatabaseErrors in core/lib/ Drupal/ Core/ Installer/ Form/ SiteSettingsForm.php 
- Get any database errors and links them to a form element.
File
- core/lib/ Drupal/ Core/ Installer/ Form/ SiteSettingsForm.php, line 217 
Class
- SiteSettingsForm
- Provides a form to configure and rewrite settings.php.
Namespace
Drupal\Core\Installer\FormCode
public static function getDatabaseErrorsTemplate(array $errors) {
  return [
    '#type' => 'inline_template',
    '#template' => '{% trans %}Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/docs/8/install">installation handbook</a>, or contact your hosting provider.{% endtrans %}{{ errors }}',
    '#context' => [
      'errors' => [
        '#theme' => 'item_list',
        '#items' => $errors,
      ],
    ],
  ];
}