public function ProtectedPagesDeleteConfirmForm::submitForm in Protected Pages 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
- src/
Form/ ProtectedPagesDeleteConfirmForm.php, line 114
Class
- ProtectedPagesDeleteConfirmForm
- Provides delete protected page confirm form.
Namespace
Drupal\protected_pages\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->protectedPagesStorage
->deleteProtectedPage($this->pid);
$this->messenger
->addMessage($this
->t('The password has been successfully removed.'));
$form_state
->setRedirectUrl($this
->getCancelUrl());
}