function SettingsForm::cancel

Form submission handler for the 'cancel' action.

File

tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php, line 105

Class

SettingsForm
Implements the settings form.

Namespace

Drupal\rules_test_ui_embed\Form

Code

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