You are here

public function SettingsForm::buildForm in Adminimal Admin Toolbar 8

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

src/Form/SettingsForm.php, line 35
Contains \Drupal\adminimal_admin_toolbar\Form\SettingsForm.

Class

SettingsForm
Configure menu link weight settings.

Namespace

Drupal\adminimal_admin_toolbar\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('adminimal_admin_toolbar.settings');
  $form['avoid_custom_font'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Avoid loading "Open Sans" font'),
    '#default_value' => $config
      ->get('avoid_custom_font'),
    '#description' => $this
      ->t('Google Open Sans will not be downloaded if this is checked (useful for languages that are not well supported by the "Open sans" font. Like Japanese for example).'),
  ];
  return parent::buildForm($form, $form_state);
}