function ToolbarSettingsForm::buildForm
Same name in other branches
- 4.x src/Form/ToolbarSettingsForm.php \Drupal\devel\Form\ToolbarSettingsForm::buildForm()
Overrides ConfigFormBase::buildForm
File
-
src/
Form/ ToolbarSettingsForm.php, line 51
Class
- ToolbarSettingsForm
- Configures devel toolbar settings.
Namespace
Drupal\devel\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->configFactory
->getEditable('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);
}