Skip to content
Snippets Groups Projects

fixed

Merged chetan requested to merge issue/tiny_slider-3408349:3408349-undefined-array-key into 1.1.x
Files
2
@@ -67,7 +67,7 @@ class TinySlider extends StylePluginBase {
'#type' => 'number',
'#step' => '.1',
'#title' => $this->t('Items'),
'#default_value' => $this->options['items'],
'#default_value' => isset($this->options['items']) ? $this->options['items'] : '',
'#description' => $this->t('Maximum amount of items displayed at a time with the widest browser width.'),
'#states' => $hideOnAdvancedMode,
];
@@ -75,7 +75,7 @@ class TinySlider extends StylePluginBase {
$form['gutter'] = [
'#type' => 'number',
'#title' => $this->t('Gutter'),
'#default_value' => $this->options['gutter'],
'#default_value' => isset($this->options['gutter']) ? $this->options['gutter'] : '',
'#description' => $this->t('Gutter from items.'),
'#states' => $hideOnAdvancedMode,
];
@@ -87,7 +87,7 @@ class TinySlider extends StylePluginBase {
'carousel' => $this->t('Carousel'),
'gallery' => $this->t('Gallery'),
],
'#default_value' => $this->options['mode'],
'#default_value' => isset($this->options['mode']) ? $this->options['mode'] : '',
'#description' => $this->t('With carousel everything slides to the side, while gallery uses fade animations and changes all slides at once.'),
'#states' => $hideOnAdvancedMode,
];
@@ -95,19 +95,19 @@ class TinySlider extends StylePluginBase {
$form['nav'] = [
'#type' => 'checkbox',
'#title' => $this->t('Navigation'),
'#default_value' => $this->options['nav'],
'#default_value' => isset($this->options['nav']) ? $this->options['nav'] : '',
'#description' => $this->t('Controls the display and functionalities of nav components (dots).'),
'#states' => $hideOnAdvancedMode,
];
// navPosition.
$form['navPosition'] = [
$form['navPosition'] = [
'#type' => 'select',
'#title' => $this->t('Navigation position'),
'#options' => [
'top' => $this->t('Top'),
'bottom' => $this->t('Bottom'),
],
'#default_value' => $this->options['navPosition'],
'#default_value' => isset($this->options['navPosition']) ? $this->options['navPosition'] : '',
'#description' => $this->t('Display navigation above/below slides.'),
'#states' => [
'visible' => [
@@ -117,10 +117,10 @@ class TinySlider extends StylePluginBase {
],
];
// navAsThumbnails.
$form['navAsThumbnails'] = [
$form['navAsThumbnails'] = [
'#type' => 'checkbox',
'#title' => $this->t('Navigation as thumbnails'),
'#default_value' => $this->options['navAsThumbnails'],
'#default_value' => isset($this->options['navAsThumbnails']) ? $this->options['navAsThumbnails'] : '',
'#description' => $this->t('Use image thumbnails in navigation instead of dots.'),
'#states' => [
'visible' => [
@@ -133,7 +133,7 @@ class TinySlider extends StylePluginBase {
$form['autoplay'] = [
'#type' => 'checkbox',
'#title' => $this->t('Autoplay'),
'#default_value' => $this->options['autoplay'],
'#default_value' => isset($this->options['autoplay']) ? $this->options['autoplay'] : '',
'#description' => $this->t('Toggles the automatic change of slides.'),
'#states' => $hideOnAdvancedMode,
];
@@ -154,7 +154,7 @@ class TinySlider extends StylePluginBase {
$form['autoplayButtonOutput'] = [
'#type' => 'checkbox',
'#title' => $this->t('Autoplay buttons'),
'#default_value' => $this->options['autoplayButtonOutput'],
'#default_value' => isset($this->options['autoplayButtonOutput']) ? $this->options['autoplayButtonOutput'] : '',
'#description' => $this->t('Turn off/on arrow autoplay buttons.'),
'#states' => [
'visible' => [
@@ -164,14 +164,14 @@ class TinySlider extends StylePluginBase {
],
];
// autoplayPosition.
$form['autoplayPosition'] = [
$form['autoplayPosition'] = [
'#type' => 'select',
'#title' => $this->t('Autoplay position'),
'#options' => [
'top' => $this->t('Top'),
'bottom' => $this->t('Bottom'),
],
'#default_value' => $this->options['autoplayPosition'],
'#default_value' => isset($this->options['autoplayPosition']) ? $this->options['autoplayPosition'] : '',
'#description' => $this->t('Display autoplay controls above/below slides.'),
'#states' => [
'visible' => [
@@ -185,7 +185,7 @@ class TinySlider extends StylePluginBase {
$form['autoplayTextStart'] = [
'#type' => 'textfield',
'#title' => $this->t('Start Text'),
'#default_value' => $this->options['autoplayTextStart'],
'#default_value' => isset($this->options['autoplayTextStart']) ? $this->options['autoplayTextStart'] : '',
'#states' => [
'visible' => [
':input[name="style_options[autoplay]"]' => ['checked' => TRUE],
@@ -198,7 +198,7 @@ class TinySlider extends StylePluginBase {
$form['autoplayTextStop'] = [
'#type' => 'textfield',
'#title' => $this->t('Stop Text'),
'#default_value' => $this->options['autoplayTextStop'],
'#default_value' => isset($this->options['autoplayTextStop']) ? $this->options['autoplayTextStop'] : '',
'#states' => [
'visible' => [
':input[name="style_options[autoplay]"]' => ['checked' => TRUE],
@@ -211,19 +211,19 @@ class TinySlider extends StylePluginBase {
$form['controls'] = [
'#type' => 'checkbox',
'#title' => $this->t('Controls'),
'#default_value' => $this->options['controls'],
'#default_value' => isset($this->options['controls']) ? $this->options['controls'] : '',
'#description' => $this->t('Controls the display and functionalities of (prev/next buttons).'),
'#states' => $hideOnAdvancedMode,
];
// controlsPosition.
$form['controlsPosition'] = [
$form['controlsPosition'] = [
'#type' => 'select',
'#title' => $this->t('Controls position'),
'#options' => [
'top' => $this->t('Top'),
'bottom' => $this->t('Bottom'),
],
'#default_value' => $this->options['controlsPosition'],
'#default_value' => isset($this->options['controlsPosition']) ? $this->options['controlsPosition'] : '',
'#description' => $this->t('Display controls above/below slides.'),
'#states' => [
'visible' => [
@@ -236,7 +236,7 @@ class TinySlider extends StylePluginBase {
$form['controlsTextPrev'] = [
'#type' => 'textfield',
'#title' => $this->t('Prev Text'),
'#default_value' => $this->options['controlsTextPrev'],
'#default_value' => isset($this->options['controlsTextPrev']) ? $this->options['controlsTextPrev'] : '',
'#states' => [
'visible' => [
':input[name="style_options[controls]"]' => ['checked' => TRUE],
@@ -248,7 +248,7 @@ class TinySlider extends StylePluginBase {
$form['controlsTextNext'] = [
'#type' => 'textfield',
'#title' => $this->t('Next Text'),
'#default_value' => $this->options['controlsTextNext'],
'#default_value' => isset($this->options['controlsTextNext']) ? $this->options['controlsTextNext'] : '',
'#states' => [
'visible' => [
':input[name="style_options[controls]"]' => ['checked' => TRUE],
@@ -260,7 +260,7 @@ class TinySlider extends StylePluginBase {
$form['slideBy'] = [
'#type' => 'textfield',
'#title' => $this->t('Slide by'),
'#default_value' => $this->options['slideBy'],
'#default_value' => isset($this->options['slideBy']) ? $this->options['slideBy'] : '',
'#description' => $this->t('Number of slides going on one "click". Enter a positive number or "page" to slide one page at a time.'),
'#states' => $hideOnAdvancedMode,
];
@@ -268,7 +268,7 @@ class TinySlider extends StylePluginBase {
$form['arrowKeys'] = [
'#type' => 'checkbox',
'#title' => $this->t('Arrow Keys'),
'#default_value' => $this->options['arrowKeys'],
'#default_value' => isset($this->options['arrowKeys']) ? $this->options['arrowKeys'] : '',
'#description' => $this->t('Allows using arrow keys to switch slides.'),
'#states' => $hideOnAdvancedMode,
];
@@ -276,7 +276,7 @@ class TinySlider extends StylePluginBase {
$form['mouseDrag'] = [
'#type' => 'checkbox',
'#title' => $this->t('Mouse Drag'),
'#default_value' => $this->options['mouseDrag'],
'#default_value' => isset($this->options['mouseDrag']) ? $this->options['mouseDrag'] : '',
'#description' => $this->t('Turn off/on mouse drag.'),
'#states' => $hideOnAdvancedMode,
];
@@ -284,7 +284,7 @@ class TinySlider extends StylePluginBase {
$form['loop'] = [
'#type' => 'checkbox',
'#title' => $this->t('Loop'),
'#default_value' => $this->options['loop'],
'#default_value' => isset($this->options['loop']) ? $this->options['loop'] : '',
'#description' => $this->t('Moves throughout all the slides seamlessly.'),
'#states' => $hideOnAdvancedMode,
];
@@ -292,7 +292,7 @@ class TinySlider extends StylePluginBase {
$form['center'] = [
'#type' => 'checkbox',
'#title' => $this->t('Center'),
'#default_value' => $this->options['center'],
'#default_value' => isset($this->options['center']) ? $this->options['center'] : '',
'#description' => $this->t('Center the active slide in the viewport.'),
'#states' => $hideOnAdvancedMode,
];
@@ -300,7 +300,7 @@ class TinySlider extends StylePluginBase {
$form['speed'] = [
'#type' => 'number',
'#title' => $this->t('Speed'),
'#default_value' => $this->options['speed'],
'#default_value' => isset($this->options['speed']) ? $this->options['speed'] : '',
'#description' => $this->t('Pagination speed in milliseconds.'),
'#states' => $hideOnAdvancedMode,
];
@@ -308,7 +308,7 @@ class TinySlider extends StylePluginBase {
$form['dimensionMobile'] = [
'#type' => 'number',
'#title' => $this->t('Mobile dimension'),
'#default_value' => $this->options['dimensionMobile'],
'#default_value' => isset($this->options['dimensionMobile']) ? $this->options['dimensionMobile'] : '',
'#description' => $this->t('Set the mobile dimensions in px.'),
'#states' => $hideOnAdvancedMode,
];
@@ -317,7 +317,7 @@ class TinySlider extends StylePluginBase {
'#type' => 'number',
'#step' => '.1',
'#title' => $this->t('Mobile items'),
'#default_value' => $this->options['itemsMobile'],
'#default_value' => isset($this->options['itemsMobile']) ? $this->options['itemsMobile'] : '',
'#description' => $this->t('Maximum amount of items displayed at mobile.'),
'#states' => $hideOnAdvancedMode,
];
@@ -325,7 +325,7 @@ class TinySlider extends StylePluginBase {
$form['dimensionDesktop'] = [
'#type' => 'number',
'#title' => $this->t('Desktop dimension'),
'#default_value' => $this->options['dimensionDesktop'],
'#default_value' => isset($this->options['dimensionDesktop']) ? $this->options['dimensionMobile'] : '',
'#description' => $this->t('Set the desktop dimension in px.'),
'#states' => $hideOnAdvancedMode,
];
@@ -334,7 +334,7 @@ class TinySlider extends StylePluginBase {
'#type' => 'number',
'#step' => '.1',
'#title' => $this->t('Desktop items'),
'#default_value' => $this->options['itemsDesktop'],
'#default_value' => isset($this->options['itemsDesktop']) ? $this->options['itemsMobile'] : '',
'#description' => $this->t('Maximum amount of items displayed at desktop.'),
'#states' => $hideOnAdvancedMode,
];
Loading