You are here

public function SlickSettingsForm::buildForm in Slick Carousel 8

Same name and namespace in other branches
  1. 8.2 slick_ui/src/Form/SlickSettingsForm.php \Drupal\slick_ui\Form\SlickSettingsForm::buildForm()
  2. 7.3 slick_ui/src/Form/SlickSettingsForm.php \Drupal\slick_ui\Form\SlickSettingsForm::buildForm()

Implements \Drupal\Core\Form\FormInterface::buildForm().

Overrides ConfigFormBase::buildForm

File

slick_ui/src/Form/SlickSettingsForm.php, line 58

Class

SlickSettingsForm
Defines the Slick admin settings form.

Namespace

Drupal\slick_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('slick.settings');
  $form['module_css'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enable Slick module slick.theme.css'),
    '#description' => $this
      ->t('Uncheck to permanently disable the module slick.theme.css, normally included along with skins.'),
    '#default_value' => $config
      ->get('module_css'),
    '#prefix' => $this
      ->t("Note! Slick doesn't need Slick UI to run. It is always safe to uninstall Slick UI once done with optionsets."),
  ];
  $form['slick_css'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Enable Slick library slick-theme.css'),
    '#description' => $this
      ->t('Uncheck to permanently disable the optional slick-theme.css, normally included along with skins.'),
    '#default_value' => $config
      ->get('slick_css'),
  ];
  return parent::buildForm($form, $form_state);
}