public function TermFormController::delete

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

Overrides EntityFormController::delete

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php, line 202
Definition of Drupal\taxonomy\TermFormController.

Class

TermFormController
Base for controller for taxonomy term edit forms.

Namespace

Drupal\taxonomy

Code

public function delete(array $form, array &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $term = $this
    ->getEntity($form_state);
  $form_state['redirect'] = array(
    'taxonomy/term/' . $term->tid . '/delete',
    array(
      'query' => $destination,
    ),
  );
}