public function SchemaSettingsForm::buildForm in Schema 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ SchemaSettingsForm.php, line 49 - Contains \Drupal\schema\Form\SchemaSettingsForm.
Class
Namespace
Drupal\schema\FormCode
public function buildForm(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
$connection_options = schema_get_connection_options();
$form['schema_database_connection'] = array(
'#type' => 'select',
'#title' => t('Database connection to use'),
'#default_value' => \Drupal::config('schema.settings')
->get('schema_database_connection'),
'#options' => $connection_options,
'#description' => t('If you use a secondary database other than the default Drupal database you can select it here and use schema\'s "compare" and "inspect" functions on that other database.'),
'#access' => count($connection_options) > 1,
);
$form['schema_status_report'] = array(
'#type' => 'checkbox',
'#title' => t('Include schema comparison reports in site status report'),
'#default_value' => \Drupal::config('schema.settings')
->get('schema_status_report'),
'#description' => t('When checked, schema comparison reports are run on the Administer page, and included in the site status report.'),
);
$form['schema_suppress_type_warnings'] = array(
'#type' => 'checkbox',
'#title' => t('Suppress schema warnings.'),
'#default_value' => \Drupal::config('schema.settings')
->get('schema_suppress_type_warnings'),
'#description' => t('When checked, missing schema type warnings will be suppressed.'),
);
return parent::buildForm($form, $form_state);
}