You are here

public function DashboardLayoutBuilderForm::redirectOnSubmit in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x src/Form/DashboardLayoutBuilderForm.php \Drupal\dashboards\Form\DashboardLayoutBuilderForm::redirectOnSubmit()

Form submission handler.

File

src/Form/DashboardLayoutBuilderForm.php, line 199

Class

DashboardLayoutBuilderForm
DashboardLayoutBuilderForm class.

Namespace

Drupal\dashboards\Form

Code

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