public function LayoutBuilderMigrationConfirmForm::submitForm in Panelizer 8.5
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ LayoutBuilderMigrationConfirmForm.php, line 90
Class
- LayoutBuilderMigrationConfirmForm
- A confirmation form for migrating an entity display to Layout Builder.
Namespace
Drupal\panelizer\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$form_state
->setRedirectUrl($this
->getCancelUrl());
$display = $this
->getDisplay();
$batch = LayoutBuilderMigration::fromDisplay($display)
->toArray();
batch_set($batch);
}