public function FormModeThemeSwitcherForm::buildForm in Form mode manager 8.2
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 FormModeManagerFormBase::buildForm
File
- modules/
form_mode_theme_switcher/ src/ Form/ FormModeThemeSwitcherForm.php, line 95
Class
- FormModeThemeSwitcherForm
- Configure Form for Form Mode Manager theme switcher settings.
Namespace
Drupal\form_mode_manager_theme_switcher\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
if (isset($form['empty'])) {
return $form;
}
$form['theme_switcher_form_mode_settings'] = [
'#type' => 'details',
'#title' => $this
->t('Theme Switcher per form mode'),
'#open' => TRUE,
];
$form['theme_switcher_form_mode_settings']['vertical_tabs_per_modes'] = [
'#type' => 'vertical_tabs',
];
$this
->buildFormModeForm($form);
return $form;
}