You are here

public function ReactionRuleEditForm::cancel in Rules 8.3

Form submission handler for the 'cancel' action.

File

src/Form/ReactionRuleEditForm.php, line 163

Class

ReactionRuleEditForm
Provides a form to edit a reaction rule.

Namespace

Drupal\rules\Form

Code

public function cancel(array $form, FormStateInterface $form_state) {
  $this->rulesUiHandler
    ->clearTemporaryStorage();
  $this
    ->messenger()
    ->addMessage($this
    ->t('Canceled.'));
  $form_state
    ->setRedirect('entity.rules_reaction_rule.collection');
}