You are here

public function IdpDeleteForm::submitForm in SAML Service Provider 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/IdpDeleteForm.php \Drupal\saml_sp\Form\IdpDeleteForm::submitForm()
  2. 4.x src/Form/IdpDeleteForm.php \Drupal\saml_sp\Form\IdpDeleteForm::submitForm()
  3. 3.x src/Form/IdpDeleteForm.php \Drupal\saml_sp\Form\IdpDeleteForm::submitForm()

Overrides EntityDeleteFormTrait::submitForm

File

src/Form/IdpDeleteForm.php, line 66

Class

IdpDeleteForm
Provides the user interface for deleting an IdP.

Namespace

Drupal\saml_sp\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->entity
    ->delete();
  \Drupal::messenger()
    ->addMessage($this
    ->t('Identity Provider %label has been deleted.', [
    '%label' => $this->entity
      ->label(),
  ]));
  $form_state
    ->setRedirectUrl($this
    ->getCancelUrl());
}