You are here

public function SettingsForm::buildForm in Build Hooks 8.2

Same name in this branch
  1. 8.2 src/Form/SettingsForm.php \Drupal\build_hooks\Form\SettingsForm::buildForm()
  2. 8.2 modules/build_hooks_bitbucket/src/Form/SettingsForm.php \Drupal\build_hooks_bitbucket\Form\SettingsForm::buildForm()
Same name and namespace in other branches
  1. 8 src/Form/SettingsForm.php \Drupal\build_hooks\Form\SettingsForm::buildForm()
  2. 3.x src/Form/SettingsForm.php \Drupal\build_hooks\Form\SettingsForm::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/SettingsForm.php, line 70

Class

SettingsForm
Class SettingsForm.

Namespace

Drupal\build_hooks\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('build_hooks.settings');
  $form['logged_entity_types'] = [
    '#type' => 'checkboxes',
    '#options' => $this
      ->getContentEntityTypes(),
    '#default_value' => $config
      ->get('logging.entity_types'),
    '#title' => $this
      ->t('Loggable entities'),
    '#description' => $this
      ->t('What entities should the system consider when logging "changes" for an environment?'),
  ];
  return parent::buildForm($form, $form_state);
}