You are here

public function Tasks::getFormOptions in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Database/Install/Tasks.php \Drupal\Core\Database\Install\Tasks::getFormOptions()
  2. 8 core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php \Drupal\Core\Database\Driver\sqlite\Install\Tasks::getFormOptions()
  3. 8 core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php \Drupal\Core\Database\Driver\pgsql\Install\Tasks::getFormOptions()
  4. 8 core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php \Drupal\Core\Database\Driver\mysql\Install\Tasks::getFormOptions()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php \Drupal\Core\Database\Driver\mysql\Install\Tasks::getFormOptions()

Return driver specific configuration options.

Parameters

$database: An array of driver specific configuration options.

Return value

The options form array.

Overrides Tasks::getFormOptions

File

core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php, line 145

Class

Tasks
Specifies installation tasks for MySQL and equivalent databases.

Namespace

Drupal\Core\Database\Driver\mysql\Install

Code

public function getFormOptions(array $database) {
  $form = parent::getFormOptions($database);
  if (empty($form['advanced_options']['port']['#default_value'])) {
    $form['advanced_options']['port']['#default_value'] = '3306';
  }
  return $form;
}