public function LBATConfigForm::buildForm in Layout builder admin theme 8
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/ LBATConfigForm.php, line 32
Class
- LBATConfigForm
- Class LBATConfigForm.
Namespace
Drupal\layout_builder_admin_theme\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('layout_builder_admin_theme.config');
// Checkbox to enable or disable the admin theme for layout builder.
$form['lbat_enable_admin_theme'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Enable admin theme for layout builder'),
'#default_value' => $config
->get('lbat_enable_admin_theme'),
];
return parent::buildForm($form, $form_state);
}