| 1 | <?php |
||
| 11 | class OwlCarousel extends Widget |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Items (div, a, img, span, li etc.) |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | public $items = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Container element (div, ul etc.) |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | public $containerTag = 'div'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Call the plugin function and your carousel is ready. |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | public $pluginInit = '$(".owl-carousel").owlCarousel();'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Only the class owl-carousel is mandatory to apply proper styles |
||
| 33 | * NOTE: The owl-theme class is optional, but without it, you will need to style navigation features on your own. |
||
| 34 | * @var array |
||
| 35 | */ |
||
| 36 | protected $defaultContainerOptions = ['class' => 'owl-carousel owl-theme']; |
||
| 37 | |||
| 38 | public $containerOptions = []; |
||
| 39 | |||
| 40 | public function run() |
||
| 51 | |||
| 52 | public function initCarouselJs() |
||
| 57 | } |
||
| 58 |