You are here

public function UIkitComponentsAdvancedForm::buildForm in UIkit Components 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/UIkitComponentsAdvancedForm.php, line 20

Class

UIkitComponentsAdvancedForm

Namespace

Drupal\uikit_components\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {

  // Form constructor.
  $form = parent::buildForm($form, $form_state);

  // Layout.
  $form['layout'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Layout'),
  ];

  // Navigations.
  $form['navigations'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Navigations'),
  ];

  // Common.
  $form['common'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Common'),
  ];

  // JavaScript.
  $form['javascript'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('JavaScript'),
  ];
  return $form;
}