JCarouselConfig.php in jCarousel 8.4
Same filename and directory in other branches
Contains \Drupal\jcarousel\Form\JCarouselConfig.
Namespace
Drupal\jcarousel\FormFile
src/Form/JCarouselConfig.phpView source
<?php
/**
* @file
* Contains \Drupal\jcarousel\Form\JCarouselConfig.
*/
namespace Drupal\jcarousel\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configure jCarousel global settings.
*/
class JCarouselConfig extends ConfigFormBase {
/**
* {@inheritdoc}
*/
public function getFormID() {
return 'jcarousel_config';
}
/**
* {@inheritdoc}
*/
protected function getEditableConfigNames() {
return [
'jcarousel.settings',
];
}
/**
* {@inheritdoc}
*/
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);
}
}
Classes
Name | Description |
---|---|
JCarouselConfig | Configure jCarousel global settings. |