You are here

public function DefaultsEntityForm::redirectOnSubmit in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::redirectOnSubmit()
  2. 10 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::redirectOnSubmit()

Form submission handler.

File

core/modules/layout_builder/src/Form/DefaultsEntityForm.php, line 196

Class

DefaultsEntityForm
Provides a form containing the Layout Builder UI for defaults.

Namespace

Drupal\layout_builder\Form

Code

public function redirectOnSubmit(array $form, FormStateInterface $form_state) {
  $form_state
    ->setRedirectUrl($this->sectionStorage
    ->getLayoutBuilderUrl($form_state
    ->getTriggeringElement()['#redirect']));
}