public function UpdateReady::buildForm in Automatic Updates 8.2
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 FormInterface::buildForm
File
- src/
Form/ UpdateReady.php, line 73
Class
- UpdateReady
- Defines a form to commit staged updates.
Namespace
Drupal\automatic_updates\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['backup'] = [
'#prefix' => '<strong>',
'#markup' => $this
->t('Back up your database and site before you continue. <a href=":backup_url">Learn how</a>.', [
':backup_url' => 'https://www.drupal.org/node/22281',
]),
'#suffix' => '</strong>',
];
$form['maintenance_mode'] = [
'#title' => $this
->t('Perform updates with site in maintenance mode (strongly recommended)'),
'#type' => 'checkbox',
'#default_value' => TRUE,
];
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Continue'),
];
return $form;
}