You are here

public function EnvironmentIndicatorFormController::delete in Environment Indicator 8.2

Delete your config entity.

There will eventually be default code to rely on here, but it doesn't exist yet.

File

lib/Drupal/environment_indicator/EnvironmentIndicatorFormController.php, line 94

Class

EnvironmentIndicatorFormController

Namespace

Drupal\environment_indicator

Code

public function delete(array $form, array &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $entity = $this
    ->getEntity($form_state);
  $form_state['redirect'] = array(
    'admin/config/development/environment-indicator/manage/' . $entity
      ->id() . '/delete',
    array(
      'query' => $destination,
    ),
  );
}