You are here

public function CrossdomainDeleteForm::submit in Crossdomain 8

File

lib/Drupal/crossdomain/Form/CrossdomainDeleteForm.php, line 42
Contains Drupal\crossdomain\Form\CrossdomainDeleteForm.

Class

CrossdomainDeleteForm
Builds the form to delete a domain.

Namespace

Drupal\crossdomain\Form

Code

public function submit(array $form, array &$form_state) {
  $this->entity
    ->delete();
  drupal_set_message($this
    ->t('%label has been deleted.', array(
    '%label' => $this->entity
      ->label(),
  )));
  $form_state['redirect'] = 'admin/config/media/crossdomain';
}