protected function UpdaterForm::actions in Automatic Updates 8.2
Builds the form actions.
Return value
mixed[][] The form's actions elements.
1 call to UpdaterForm::actions()
- UpdaterForm::buildForm in src/
Form/ UpdaterForm.php - Form constructor.
File
- src/
Form/ UpdaterForm.php, line 205
Class
- UpdaterForm
- Defines a form to update Drupal core.
Namespace
Drupal\automatic_updates\FormCode
protected function actions() : array {
$actions = [
'#type' => 'actions',
];
if ($this->updater
->hasActiveUpdate()) {
$this
->messenger()
->addError($this
->t('Another Composer update process is currently active'));
$actions['delete'] = [
'#type' => 'submit',
'#value' => $this
->t('Delete existing update'),
'#submit' => [
'::deleteExistingUpdate',
],
];
}
else {
$actions['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Update'),
];
}
return $actions;
}