You are here

public function SettingsForm::cancel in Rules 8.3

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