DeleteForm::submitForm

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

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());
}
doc_Drupal
2016-10-29 09:02:10
Comments
Leave a Comment

Please login to continue.