You are here

public function RulesComponentEditForm::cancel in Rules 8.3

Form submission handler for the 'cancel' action.

File

src/Form/RulesComponentEditForm.php, line 94

Class

RulesComponentEditForm
Provides a form to edit a component.

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