public function FieldInstanceEditForm::delete

Redirects to the field instance deletion form.

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php, line 212
Contains \Drupal\field_ui\Form\FieldInstanceEditForm.

Class

FieldInstanceEditForm
Provides a form for the field instance settings form.

Namespace

Drupal\field_ui\Form

Code

public function delete(array &$form, array &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $form_state['redirect'] = array(
    'admin/structure/types/manage/' . $this->instance['bundle'] . '/fields/' . $this->instance
      ->id() . '/delete',
    array(
      'query' => $destination,
    ),
  );
}