You are here

public function SlickSettingsForm::buildForm in Slick Carousel 7.3

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

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

File

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

Class

SlickSettingsForm
Defines the Slick admin settings form.

Namespace

Drupal\slick_ui\Form

Code

public function buildForm() {
  $form['module_css'] = [
    '#type' => 'checkbox',
    '#title' => t('Enable Slick module slick.theme.css'),
    '#description' => t('Uncheck to permanently disable the module slick.theme.css, normally included along with skins.'),
    '#default_value' => $this->manager
      ->config('module_css', TRUE),
    '#prefix' => 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' => t('Enable Slick library slick-theme.css'),
    '#description' => t('Uncheck to permanently disable the optional slick-theme.css, normally included along with skins.'),
    '#default_value' => $this->manager
      ->config('slick_css', TRUE),
  ];
  $form['deprecated'] = [
    '#type' => 'checkbox',
    '#title' => t('Include deprecated functions (BC)'),
    '#description' => t('Only uncheck once Slick views or Slick entityreference is updated from 2.x to 3.x, _only if using any. Until then keep it checked for backward compatibility (BC).'),
    '#default_value' => $this->manager
      ->config('deprecated', TRUE),
  ];
  $form['deprecated_formatter'] = [
    '#type' => 'checkbox',
    '#title' => t('Include deprecated formatters (BC)'),
    '#description' => t('You can safely uncheck, once the provided update is successful. Verify that Slick carousel (deprecated) has been changed into just Slick carousel at Field UI. Otherwise keep it enabled till you change them. Be sure to clear cache!'),
    '#default_value' => $this->manager
      ->config('deprecated_formatter', TRUE),
  ];
  $form['#submit'][] = 'slick_ui_submit_form';
  return system_settings_form($form);
}