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 +}