AdvancedForm.php in UIkit Components 8.2
File
src/Form/AdvancedForm.php
View source
<?php
namespace Drupal\uikit_components\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
class AdvancedForm extends ConfigFormBase {
public function getFormId() {
return 'uikit_components_advanced_form';
}
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$form['layout'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Layout'),
];
$form['navigations'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Navigations'),
];
$form['common'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Common'),
];
$form['javascript'] = [
'#type' => 'fieldset',
'#title' => $this
->t('JavaScript'),
];
return $form;
}
public function validateForm(array &$form, FormStateInterface $form_state) {
}
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('uikit_components.advanced');
$config
->save();
}
protected function getEditableConfigNames() {
return [
'uikit_components.advanced',
];
}
}