function LayoutBuilderSettingsForm::buildForm

Same name in other branches
  1. 10 core/modules/layout_builder/src/Form/LayoutBuilderSettingsForm.php \Drupal\layout_builder\Form\LayoutBuilderSettingsForm::buildForm()

Overrides ConfigFormBase::buildForm

File

core/modules/layout_builder/src/Form/LayoutBuilderSettingsForm.php, line 30

Class

LayoutBuilderSettingsForm
Configure layout builder settings for this site.

Namespace

Drupal\layout_builder\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) : array {
    $form['expose_all_field_blocks'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Expose all fields as blocks to layout builder'),
        '#description' => $this->t('When enabled, this setting exposes all fields for all entity view displays.<br/> When disabled, only entity type bundles that have layout builder enabled will have their fields exposed.<br/> Enabling this setting could <strong>significantly decrease performance</strong> on sites with a large number of entity types and bundles.'),
        '#config_target' => 'layout_builder.settings:expose_all_field_blocks',
    ];
    return parent::buildForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.