From 459aba6961c3d890faf798e44c65061e6fd4f25f Mon Sep 17 00:00:00 2001 From: attybean Date: Wed, 14 Nov 2018 09:59:19 +0100 Subject: [PATCH] Update Carousel.php controls option is not sent through to yii bootstrap carousel, this modification passes them through use sample: 6000, 'controls' => ['','']]);?> --- modules/carousel/api/Carousel.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/carousel/api/Carousel.php b/modules/carousel/api/Carousel.php index 7f8c940..b7d9862 100644 --- a/modules/carousel/api/Carousel.php +++ b/modules/carousel/api/Carousel.php @@ -61,11 +61,14 @@ public function api_widget($width, $height, $clientOptions = []) $items[] = $temp; } - $widget = \yii\bootstrap\Carousel::widget([ + $widgetItems = [ 'options' => ['class' => 'slide'], 'clientOptions' => $this->clientOptions, 'items' => $items - ]); + ]; + if(isset($this->clientOptions['controls'])) + $widgetItems['controls'] = $this->clientOptions['controls']; + $widget = \yii\bootstrap\Carousel::widget($widgetItems); return LIVE_EDIT ? API::liveEdit($widget, Url::to(['/admin/carousel']), 'div') : $widget; } @@ -74,4 +77,4 @@ public function api_items() { return $this->_items; } -} \ No newline at end of file +}