public function CourseSettingsForm::buildForm in Course 8.3
Same name and namespace in other branches
- 8.2 src/Form/CourseSettingsForm.php \Drupal\course\Form\CourseSettingsForm::buildForm()
- 3.x src/Form/CourseSettingsForm.php \Drupal\course\Form\CourseSettingsForm::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/ CourseSettingsForm.php, line 29
Class
Namespace
Drupal\course\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('course.settings');
$form['testing'] = [
'#type' => 'textarea',
'#title' => $this
->t('Welcome message'),
'#description' => $this
->t('Welcome message display to users when they login'),
'#default_value' => $config
->get('testing'),
];
return parent::buildForm($form, $form_state);
}