You are here

public function BackupDeleteForm::submitForm in Backup and Migrate 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Form/BackupDeleteForm.php \Drupal\backup_migrate\Form\BackupDeleteForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/BackupDeleteForm.php, line 90

Class

BackupDeleteForm

Namespace

Drupal\backup_migrate\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $destination = $this->destination
    ->getObject();
  $destination
    ->deleteFile($this->backupId);
  $form_state
    ->setRedirectUrl($this
    ->getCancelUrl());
}