You are here

public function GroupSettingsForm::buildForm in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Form/GroupSettingsForm.php \Drupal\group\Form\GroupSettingsForm::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/GroupSettingsForm.php, line 30

Class

GroupSettingsForm
Class GroupSettingsForm.

Namespace

Drupal\group\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $config = $this
    ->config('group.settings');
  $form['use_admin_theme'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use admin theme'),
    '#description' => $this
      ->t("Enables the administration theme for editing groups, members, etc."),
    '#default_value' => $config
      ->get('use_admin_theme'),
  ];
  return $form;
}