public function MiconMenuConfigForm::buildForm in Micon 8
Same name and namespace in other branches
- 2.x micon_menu/src/Form/MiconMenuConfigForm.php \Drupal\micon_menu\Form\MiconMenuConfigForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- micon_menu/
src/ Form/ MiconMenuConfigForm.php, line 35
Class
- MiconMenuConfigForm
- Class MiconMenuConfigForm.
Namespace
Drupal\micon_menu\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('micon_menu.config');
$form['packages'] = [
'#type' => 'checkboxes',
'#title' => $this
->t('Icon Packages'),
'#description' => $this
->t('The icon packages that should be made available to menu items. If no packages are selected, all will be made available.'),
'#options' => Micon::loadActiveLabels(),
'#default_value' => $config
->get('packages'),
];
return parent::buildForm($form, $form_state);
}