You are here

public function AuthorizationSettingsForm::buildForm in Authorization 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/AuthorizationSettingsForm.php, line 34

Class

AuthorizationSettingsForm
Configure authorization settings for this site.

Namespace

Drupal\authorization\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) : array {
  $config = $this
    ->config('authorization.settings');
  $form['authorization_message'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('If enabled, all authorization and notification messages will be shown to the user.'),
    '#default_value' => $config
      ->get('authorization_message'),
  ];
  return parent::buildForm($form, $form_state);
}