function SettingsForm::buildForm

Same name in this branch
  1. 9 core/modules/aggregator/src/Form/SettingsForm.php \Drupal\aggregator\Form\SettingsForm::buildForm()
Same name in other branches
  1. 8.9.x core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::buildForm()
  2. 8.9.x core/modules/aggregator/src/Form/SettingsForm.php \Drupal\aggregator\Form\SettingsForm::buildForm()
  3. 10 core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::buildForm()
  4. 11.x core/modules/media_library/src/Form/SettingsForm.php \Drupal\media_library\Form\SettingsForm::buildForm()
  5. 10 core/modules/navigation/src/Form/SettingsForm.php \Drupal\navigation\Form\SettingsForm::buildForm()
  6. 11.x core/modules/navigation/src/Form/SettingsForm.php \Drupal\navigation\Form\SettingsForm::buildForm()

Overrides ConfigFormBase::buildForm

File

core/modules/media_library/src/Form/SettingsForm.php, line 33

Class

SettingsForm
Defines a form for configuring the Media Library module.

Namespace

Drupal\media_library\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
    $form['advanced_ui'] = [
        '#type' => 'checkbox',
        '#title' => $this->t('Enable advanced UI'),
        '#default_value' => $this->config('media_library.settings')
            ->get('advanced_ui'),
        '#description' => $this->t('If checked, users creating new media items in the media library will see a summary of their selected media items, and they will be able to insert their selection directly into the media field or text editor.'),
    ];
    return parent::buildForm($form, $form_state);
}

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