public function SettingsForm::buildForm in Bulk User Registration 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/ SettingsForm.php, line 33
Class
- SettingsForm
- Configure locale settings for this site.
Namespace
Drupal\bulk_user_registration\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('bulk_user_registration.settings');
$form['allowed_roles'] = [
'#type' => 'checkboxes',
'#title' => $this
->t('Roles for import'),
'#default_value' => $config
->get('allowed_roles'),
'#options' => user_role_names(TRUE),
'#description' => $this
->t('These roles can be assigned with Bulk user registration. The authenticated role will always be set.'),
];
return parent::buildForm($form, $form_state);
}