You are here

public function MiconLocalTaskConfigForm::buildForm in Micon 8

Same name and namespace in other branches
  1. 2.x micon_local_task/src/Form/MiconLocalTaskConfigForm.php \Drupal\micon_local_task\Form\MiconLocalTaskConfigForm::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_local_task/src/Form/MiconLocalTaskConfigForm.php, line 34

Class

MiconLocalTaskConfigForm
Class MiconLocalTaskConfigForm.

Namespace

Drupal\micon_local_task\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('micon_local_task.config');
  $form['icon_only'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Icon Only'),
    '#description' => $this
      ->t('When an local task has an icon, only show the icon and hide the text.'),
    '#default_value' => $config
      ->get('icon_only'),
  ];
  return parent::buildForm($form, $form_state);
}