You are here

public function Tasks::getFormOptions in Drupal driver for SQL Server and SQL Azure 8

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php \Drupal\Driver\Database\sqlsrv\Install\Tasks::getFormOptions()
  2. 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php \Drupal\Driver\Database\sqlsrv\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

drivers/lib/Drupal/Driver/Database/sqlsrv/Install/Tasks.php, line 180
Definition of Drupal\Driver\Database\sqlsrv\Tasks

Class

Tasks
Specifies installation tasks for PostgreSQL databases.

Namespace

Drupal\Driver\Database\sqlsrv\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'] = '1433';
  }

  // Make username not required.
  $form['username']['#required'] = FALSE;

  // Add a description for about leaving username blank.
  $form['username']['#description'] = t('Leave username (and password) blank to use Windows authentication.');
  return $form;
}