public function DeleteForm::submitForm

Same name in this branch

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Overrides FormInterface::submitForm

File

drupal/core/modules/action/lib/Drupal/action/Form/DeleteForm.php, line 66
Contains \Drupal\action\Form\DeleteForm.

Class

DeleteForm
Builds a form to delete an action.

Namespace

Drupal\action\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $this->action
    ->delete();
  watchdog('user', 'Deleted action %aid (%action)', array(
    '%aid' => $this->action
      ->id(),
    '%action' => $this->action
      ->label(),
  ));
  drupal_set_message(t('Action %action was deleted', array(
    '%action' => $this->action
      ->label(),
  )));
  $form_state['redirect'] = 'admin/config/system/actions';
}