getDatabaseTypes example

// \Drupal\Core\Render\Element\Checkboxes::valueCallback() requires           // NULL instead of FALSE values for programmatic form submissions to           // disable a checkbox.           'enable_update_status_module' => NULL,
          'enable_update_status_emails' => NULL,
        ],
      ],
    ];

    // If we only have one db driver available, we cannot set the driver.     include_once DRUPAL_ROOT . '/core/includes/install.inc';
    if (count($this->getDatabaseTypes()) == 1) {
      unset($parameters['forms']['install_settings_form']['driver']);
    }
    return $parameters;
  }

  /** * Sets up the base URL based upon the environment variable. * * @throws \Exception * Thrown when no SIMPLETEST_BASE_URL environment variable is provided or uses an invalid scheme. */
  

  public function buildForm(array $form, FormStateInterface $form_state) {
    if ($this->store->get('step') != 'credential') {
      return $this->restartUpgradeForm();
    }

    $form = parent::buildForm($form$form_state);
    $form['actions']['submit']['#value'] = $this->t('Review upgrade');

    $form['#title'] = $this->t('Drupal Upgrade');

    $drivers = $this->getDatabaseTypes();
    $drivers_keys = array_keys($drivers);
    $default_driver = current($drivers_keys);

    $default_options = [];

    $form['help'] = [
      '#type' => 'item',
      '#description' => $this->t('Provide the information to access the Drupal site you want to upgrade. Files can be imported into the upgraded site as well. See the <a href=":url">Upgrade documentation for more detailed instructions</a>.', [':url' => 'https://www.drupal.org/upgrade/migrate']),
    ];

    $migrate_source_version = Settings::get('migrate_source_version') == '6' ? '6' : '7';
    
Home | Imprint | This part of the site doesn't use cookies.