public function SettingsForm::buildForm in Build Hooks 3.x
Same name in this branch
- 3.x src/Form/SettingsForm.php \Drupal\build_hooks\Form\SettingsForm::buildForm()
- 3.x modules/build_hooks_bitbucket/src/Form/SettingsForm.php \Drupal\build_hooks_bitbucket\Form\SettingsForm::buildForm()
Same name and namespace in other branches
- 8.2 src/Form/SettingsForm.php \Drupal\build_hooks\Form\SettingsForm::buildForm()
- 8 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 69
Class
- SettingsForm
- Defines a settings form.
Namespace
Drupal\build_hooks\FormCode
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);
}