You are here

public function PdbNg2Form::buildForm in Decoupled Blocks 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

modules/pdb_ng2/src/Form/PdbNg2Form.php, line 32

Class

PdbNg2Form
Class PdbNg2Form.

Namespace

Drupal\pdb_ng2\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('pdb_ng2.settings');
  $form['development_mode'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Development Mode'),
    '#description' => $this
      ->t('Checking the box enables development mode'),
    '#default_value' => $config
      ->get('development_mode'),
  ];
  return parent::buildForm($form, $form_state);
}