You are here

protected function LayoutRebuildConfirmFormBase::successfulAjaxSubmit in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php \Drupal\layout_builder\Form\LayoutRebuildConfirmFormBase::successfulAjaxSubmit()
  2. 9 core/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php \Drupal\layout_builder\Form\LayoutRebuildConfirmFormBase::successfulAjaxSubmit()

Allows the form to respond to a successful AJAX submission.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

\Drupal\Core\Ajax\AjaxResponse An AJAX response.

Overrides AjaxFormHelperTrait::successfulAjaxSubmit

File

core/modules/layout_builder/src/Form/LayoutRebuildConfirmFormBase.php, line 108

Class

LayoutRebuildConfirmFormBase
Provides a base class for confirmation forms that rebuild the Layout Builder.

Namespace

Drupal\layout_builder\Form

Code

protected function successfulAjaxSubmit(array $form, FormStateInterface $form_state) {
  return $this
    ->rebuildAndClose($this->sectionStorage);
}