public function DeleteForm::submitForm in Zircon Profile 8.0
Same name in this branch
- 8.0 core/modules/path/src/Form/DeleteForm.php \Drupal\path\Form\DeleteForm::submitForm()
- 8.0 core/modules/forum/src/Form/DeleteForm.php \Drupal\forum\Form\DeleteForm::submitForm()
Same name and namespace in other branches
- 8 core/modules/forum/src/Form/DeleteForm.php \Drupal\forum\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/ forum/ src/ Form/ DeleteForm.php, line 67 - Contains \Drupal\forum\Form\DeleteForm.
Class
- DeleteForm
- Builds the form to delete a forum term.
Namespace
Drupal\forum\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->taxonomyTerm
->delete();
drupal_set_message($this
->t('The forum %label and all sub-forums have been deleted.', array(
'%label' => $this->taxonomyTerm
->label(),
)));
$this
->logger('forum')
->notice('forum: deleted %label and all its sub-forums.', array(
'%label' => $this->taxonomyTerm
->label(),
));
$form_state
->setRedirectUrl($this
->getCancelUrl());
}