You are here

public function Settings::buildForm in DRD Agent 8.3

Same name and namespace in other branches
  1. 4.0.x src/Form/Settings.php \Drupal\drd_agent\Form\Settings::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

src/Form/Settings.php, line 30

Class

Settings
Configure drd-agent settings for this site.

Namespace

Drupal\drd_agent\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) : array {
  $config = $this
    ->config('drd_agent.settings');
  $form['debug_mode'] = [
    '#type' => 'checkbox',
    '#title' => t('Debug mode'),
    '#default_value' => $config
      ->get('debug_mode'),
  ];
  return parent::buildForm($form, $form_state);
}