You are here

public function JCarouselConfig::buildForm in jCarousel 8.4

Same name and namespace in other branches
  1. 8.5 src/Form/JCarouselConfig.php \Drupal\jcarousel\Form\JCarouselConfig::buildForm()

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/JCarouselConfig.php, line 35
Contains \Drupal\jcarousel\Form\JCarouselConfig.

Class

JCarouselConfig
Configure jCarousel global settings.

Namespace

Drupal\jcarousel\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('jcarousel.settings');
  $form['global_load'] = array(
    '#type' => 'checkbox',
    '#title' => t('Load jCarousel on all pages'),
    '#default_value' => $config
      ->get('global_load'),
  );
  return parent::buildForm($form, $form_state);
}