You are here

public function FormsStepsEditForm::cancel in Forms Steps 8

Form submission handler for the 'cancel' action.

Parameters

array $form: Form to alter.

\Drupal\Core\Form\FormStateInterface $form_state: Forms States to alter.

File

src/Form/FormsStepsEditForm.php, line 439

Class

FormsStepsEditForm
Provides a form to edit a Forms Steps.

Namespace

Drupal\forms_steps\Form

Code

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