You are here

function install_verify_completed_task in Drupal 9

Same name and namespace in other branches
  1. 8 core/includes/install.core.inc \install_verify_completed_task()
  2. 7 includes/install.core.inc \install_verify_completed_task()

Verifies and returns the last installation task that was completed.

Return value

The last completed task, if there is one. An exception is thrown if Drupal is already installed.

2 calls to install_verify_completed_task()
install_begin_request in core/includes/install.core.inc
Begins an installation request, modifying the installation state as needed.
SiteSettingsForm::submitForm in core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
Form submission handler.

File

core/includes/install.core.inc, line 1125
API functions for installing Drupal.

Code

function install_verify_completed_task() {
  try {
    $task = \Drupal::state()
      ->get('install_task');
  } catch (\Exception $e) {
  }
  if (isset($task)) {
    if ($task == 'done') {
      throw new AlreadyInstalledException(\Drupal::service('string_translation'));
    }
    return $task;
  }
}