/** * {@inheritdoc} */ public function save(array $form, array &$form_state) { $this->termStorage->resetWeights($this->entity->id()); drupal_set_message($this->t('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label()))); watchdog('taxonomy', 'Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label()), WATCHDOG_NOTICE); $form_state['redirect_route'] = $this->entity->urlInfo('edit-form'); }
/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { $this->termStorage->resetWeights($this->entity->id()); drupal_set_message($this->t('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label()))); $this->logger('taxonomy')->notice('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label())); $form_state->setRedirectUrl($this->entity->urlInfo('edit-form')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); $this->termStorage->resetWeights($this->entity->id()); drupal_set_message($this->t('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label()))); $this->logger('taxonomy')->notice('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label())); $form_state->setRedirectUrl($this->getCancelUrl()); }