/** * {@inheritdoc} */ 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()); }
/** * {@inheritdoc} */ public function submitForm(array &$form, array &$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()))); watchdog('forum', 'forum: deleted %label and all its sub-forums.', array('%label' => $this->taxonomyTerm->label()), WATCHDOG_NOTICE); $form_state['redirect_route'] = $this->getCancelUrl(); }