You are here

public function ConfigDeleteConfirmForm::submitForm in Configuration Update Manager 8

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

config_update_ui/src/Form/ConfigDeleteConfirmForm.php, line 137

Class

ConfigDeleteConfirmForm
Defines a confirmation form for deleting configuration.

Namespace

Drupal\config_update_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configRevert
    ->delete($this->type, $this->name);
  $this
    ->messenger()
    ->addMessage($this
    ->t('The configuration %item has been deleted.', [
    '%item' => $this->name,
  ]));
  $form_state
    ->setRedirectUrl($this
    ->getCancelUrl());
}