function LayoutBuilderDisableForm::submitForm
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
- 
              core/modules/ layout_builder/ src/ Form/ LayoutBuilderDisableForm.php, line 106 
Class
- LayoutBuilderDisableForm
- Disables Layout Builder for a given default.
Namespace
Drupal\layout_builder\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->sectionStorage
    ->disableLayoutBuilder()
    ->save();
  $this->layoutTempstoreRepository
    ->delete($this->sectionStorage);
  $this->messenger()
    ->addMessage($this->t('Layout Builder has been disabled.'));
  $form_state->setRedirectUrl($this->getCancelUrl());
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
