You are here

public function DeleteForm::submitForm in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/path/src/Form/DeleteForm.php \Drupal\path\Form\DeleteForm::submitForm()
  2. 8 core/modules/forum/src/Form/DeleteForm.php \Drupal\forum\Form\DeleteForm::submitForm()
Same name and namespace in other branches
  1. 8.0 core/modules/path/src/Form/DeleteForm.php \Drupal\path\Form\DeleteForm::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

core/modules/path/src/Form/DeleteForm.php, line 89
Contains \Drupal\path\Form\DeleteForm.

Class

DeleteForm
Builds the form to delete a path alias.

Namespace

Drupal\path\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->aliasStorage
    ->delete(array(
    'pid' => $this->pathAlias['pid'],
  ));
  $form_state
    ->setRedirect('path.admin_overview');
}