function MenuLinksetSettingsForm::buildForm

Same name in other branches
  1. 11.x core/modules/system/src/Form/MenuLinksetSettingsForm.php \Drupal\system\Form\MenuLinksetSettingsForm::buildForm()

Overrides ConfigFormBase::buildForm

File

core/modules/system/src/Form/MenuLinksetSettingsForm.php, line 63

Class

MenuLinksetSettingsForm
Configure System settings for this site.

Namespace

Drupal\system\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
    $form['linkset']['enable_endpoint'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Enable the menu linkset endpoint'),
        '#description' => $this->t('See the <a href="@docs-link">decoupled menus documentation</a> for more information.', [
            '@docs-link' => 'https://www.drupal.org/docs/develop/decoupled-drupal/decoupled-menus',
        ]),
        '#default_value' => $this->config('system.feature_flags')
            ->get('linkset_endpoint'),
    ];
    return parent::buildForm($form, $form_state);
}

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