public function TopicSettingsForm::buildForm in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 8.4 modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 8.5 modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 8.6 modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 8.8 modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 10.3.x modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 10.0.x modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 10.1.x modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::buildForm()
- 10.2.x modules/social_features/social_topic/src/Form/TopicSettingsForm.php \Drupal\social_topic\Form\TopicSettingsForm::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
- modules/
social_features/ social_topic/ src/ Form/ TopicSettingsForm.php, line 34
Class
- TopicSettingsForm
- Class TopicSettingsForm.
Namespace
Drupal\social_topic\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('social_topic.settings');
$form['social_topic_type_select_changer'] = [
'#type' => 'number',
'#title' => $this
->t('Change input widget'),
'#description' => $this
->t('When the amount of available topic types reach this amount, on the topic edit and create page, the radio widget will be changed to a select widget for better usability.'),
'#default_value' => $config
->get('social_topic_type_select_changer'),
'#min' => 2,
'#step' => 1,
'#size' => 2,
];
return parent::buildForm($form, $form_state);
}