You are here

public function CrossdomainFormController::delete in Crossdomain 8

Delete the domain.

File

lib/Drupal/crossdomain/Controller/CrossdomainFormController.php, line 83

Class

CrossdomainFormController

Namespace

Drupal\crossdomain\Controller

Code

public function delete(array $form, array &$form_state) {
  $destination = array();
  $request = $this
    ->getRequest();
  if ($request->query
    ->has('destination')) {
    $destination = drupal_get_destination();
    $request->query
      ->remove('destination');
  }
  $entity = $this
    ->getEntity($form_state);
  $form_state['redirect'] = array(
    'admin/config/media/crossdomain/' . $entity
      ->id() . '/delete',
    array(
      'query' => $destination,
    ),
  );
}