You are here

public function MapSettingsForm::buildForm in farmOS 2.x

File

modules/core/map/src/Form/MapSettingsForm.php, line 39

Class

MapSettingsForm
Provides a farm_map settings form.

Namespace

Drupal\farm_map\Form

Code

public function buildForm(array $form, FormStateinterface $form_state) {
  $config = $this
    ->config(static::SETTINGS);

  // Add the enable side panel option.
  $form['enable_side_panel'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enable Side Panel'),
    '#description' => $this
      ->t('Enable the side panel in farmOS maps for displaying additional settings and information.'),
    '#default_value' => $config
      ->get('enable_side_panel'),
  ];
  return parent::buildForm($form, $form_state);
}