public function CommonSettingsPageForm::buildForm in Multiple Registration 8
Same name and namespace in other branches
- 8.2 src/Form/CommonSettingsPageForm.php \Drupal\multiple_registration\Form\CommonSettingsPageForm::buildForm()
- 3.x src/Form/CommonSettingsPageForm.php \Drupal\multiple_registration\Form\CommonSettingsPageForm::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/ CommonSettingsPageForm.php, line 74
Class
- CommonSettingsPageForm
- Class DeleteRegistrationPageForm.
Namespace
Drupal\multiple_registration\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('multiple_registration.common_settings_page_form_config');
$form['disable_main_register_page'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Disable main registration page'),
'#description' => $this
->t('Indicates whether main registration page will be accessible to anonymous user.'),
'#default_value' => $config
->get('multiple_registration_disable_main'),
];
$form['do_nothing'] = [
'#type' => 'submit',
'#value' => $this
->t('Cancel'),
];
$form['save'] = [
'#type' => 'submit',
'#value' => $this
->t('Save'),
];
return $form;
}