function ReactionRuleEditForm::cancel

Form submission handler for the 'cancel' action.

File

src/Form/ReactionRuleEditForm.php, line 187

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');
}