public DeleteForm::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/forum/src/Form/DeleteForm.php, line 62
Class
- DeleteForm
- Builds the form to delete a forum term.
Namespace
Drupal\forum\Form
Code
1 2 3 4 5 6 | 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()); } |
Please login to continue.