You are here

public function SmartmenusSettingsForm::buildForm in Smartmenus.js 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/SmartmenusSettingsForm.php, line 70

Class

SmartmenusSettingsForm
Class SmartmenusSettingsForm.

Namespace

Drupal\smartmenus\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config($this->smartmenusUtil
    ->getConfigFormSettingsName());
  $form['container'] = array(
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Smartmenus Settings'),
  );
  $form['container']['smartmenus_theme'] = array(
    '#type' => 'select',
    '#title' => $this
      ->t('Smart menus theme'),
    '#options' => $this
      ->getThemeOptions(),
    '#default_value' => $config
      ->get('smartmenus_theme'),
    '#required' => true,
  );
  return parent::buildForm($form, $form_state);
}