public function VocabularyFormController::submit

Overrides Drupal\Core\Entity\EntityFormController::submit().

Overrides EntityFormController::submit

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php, line 153
Definition of Drupal\taxonomy\VocabularyFormController.

Class

VocabularyFormController
Base form controller for vocabulary edit forms.

Namespace

Drupal\taxonomy

Code

public function submit(array $form, array &$form_state) {

  // @todo We should not be calling taxonomy_vocabulary_confirm_delete() from
  // within the form builder.
  if ($form_state['triggering_element']['#value'] == t('Delete')) {

    // Rebuild the form to confirm vocabulary deletion.
    $form_state['rebuild'] = TRUE;
    $form_state['confirm_delete'] = TRUE;
    return NULL;
  }
  else {
    return parent::submit($form, $form_state);
  }
}