function ToolbarSettingsForm::buildForm
Same name in other branches
- 5.x src/Form/ToolbarSettingsForm.php \Drupal\devel\Form\ToolbarSettingsForm::buildForm()
Overrides ConfigFormBase::buildForm
File
-
src/
Form/ ToolbarSettingsForm.php, line 66
Class
- ToolbarSettingsForm
- Configures devel toolbar settings.
Namespace
Drupal\devel\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('devel.toolbar.settings');
$form['toolbar_items'] = [
'#type' => 'checkboxes',
'#title' => $this->t('Menu items always visible'),
'#options' => $this->getLinkLabels(),
'#default_value' => $config->get('toolbar_items') ?: [],
'#required' => TRUE,
'#description' => $this->t('Select the menu items always visible in devel toolbar tray. All the items not selected in this list will be visible only when the toolbar orientation is vertical.'),
];
return parent::buildForm($form, $form_state);
}