function DefaultsEntityForm::buildForm
Overrides EntityForm::buildForm
File
- 
              core/modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php, line 72 
Class
- DefaultsEntityForm
- Provides a form containing the Layout Builder UI for defaults.
Namespace
Drupal\layout_builder\FormCode
public function buildForm(array $form, FormStateInterface $form_state, ?SectionStorageInterface $section_storage = NULL) {
  $form['#attributes']['class'][] = 'layout-builder-form';
  $form['layout_builder'] = [
    '#type' => 'layout_builder',
    '#section_storage' => $section_storage,
    '#process' => [
      [
        static::class,
        'layoutBuilderElementGetKeys',
      ],
    ],
  ];
  $form['layout_builder_message'] = $this->buildMessage($section_storage->getContextValue('display'));
  $this->sectionStorage = $section_storage;
  return parent::buildForm($form, $form_state);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
