You are here

public function RedhenAdminSettingsForm::buildForm in RedHen CRM 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/RedhenAdminSettingsForm.php, line 28

Class

RedhenAdminSettingsForm
Configure Redhen settings for this site.

Namespace

Drupal\redhen\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('redhen.settings');
  $form['redhen_admin_path'] = [
    '#title' => $this
      ->t('Treat RedHen paths as administrative'),
    '#type' => 'checkbox',
    '#description' => $this
      ->t('This is used by other modules to, for example, use the admin theme on RedHen paths.'),
    '#default_value' => $config
      ->get('redhen_admin_path'),
  ];
  return parent::buildForm($form, $form_state);
}