You are here

public function SettingsForm::buildForm in Gin Layout Builder 1.0.x

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/SettingsForm.php, line 32

Class

SettingsForm
Class SettingsForm.

Namespace

Drupal\gin_lb\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('gin_lb.settings');
  $form['toastify_cdn'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Load Toastify From CDN'),
    '#description' => $this
      ->t('If you uncheck this box, you will have load Toastify yourself in your theme.'),
    '#default_value' => $config
      ->get('toastify_cdn'),
  ];
  return parent::buildForm($form, $form_state);
}