public BookRemoveForm::submitForm(array &$form, FormStateInterface $form_state)
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/book/src/Form/BookRemoveForm.php, line 101
Class
- BookRemoveForm
- Remove form for book module.
Namespace
Drupal\book\Form
Code
public function submitForm(array &$form, FormStateInterface $form_state) { if ($this->bookManager->checkNodeIsRemovable($this->node)) { $this->bookManager->deleteFromBook($this->node->id()); drupal_set_message($this->t('The post has been removed from the book.')); } $form_state->setRedirectUrl($this->getCancelUrl()); }
Please login to continue.