public function SettingsForm::buildForm in BigBlueButton 8
Same name in this branch
- 8 src/Form/SettingsForm.php \Drupal\bbb\Form\SettingsForm::buildForm()
- 8 modules/bbb_node/src/Form/SettingsForm.php \Drupal\bbb_node\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
- modules/
bbb_node/ src/ Form/ SettingsForm.php, line 33
Class
- SettingsForm
- Provides an administration settings form.
Namespace
Drupal\bbb_node\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
// Get all settings.
$config = $this->configFactory
->get('bbb_node.settings');
$settings = $config
->get();
$form['bbb_client'] = [
'#title' => $this
->t('Client settings'),
'#type' => 'fieldset',
'#tree' => TRUE,
];
$form['bbb_client']['display_mode'] = [
'#title' => $this
->t('Block Links'),
'#type' => 'radios',
'#options' => [
self::DISPLAY_MODE_INLINE => $this
->t('Display inline'),
self::DISPLAY_MODE_BLANK => $this
->t('Open in a new window'),
],
'#default_value' => $settings['display_mode'],
'#description' => $this
->t('How to open links to meetings from the block provided by the Big Blue Button module.'),
];
$form['bbb_client']['display_height'] = [
'#title' => $this
->t('Height x Width'),
'#type' => 'textfield',
'#default_value' => $settings['display_height'],
'#prefix' => '<div class="container-inline">',
'#suffix' => 'x',
'#size' => 4,
];
$form['bbb_client']['display_width'] = [
'#type' => 'textfield',
'#default_value' => $settings['display_width'],
'#suffix' => '</div>',
'#size' => 4,
'#description' => '<br />' . $this
->t('Give dimensions for inline display, e.g. <em>580px</em> x <em>100%</em>.'),
];
return parent::buildForm($form, $form_state);
}