|
|
|
@ -45,6 +45,11 @@ class Carousel extends Widget
|
|
|
|
|
*/ |
|
|
|
|
public $controls = ['‹', '›']; |
|
|
|
|
/** |
|
|
|
|
* @var boolean |
|
|
|
|
* If false carousel indicators (<ol> tag with anchors to items) should not be displayed. |
|
|
|
|
*/ |
|
|
|
|
public $showIndicators = true; |
|
|
|
|
/** |
|
|
|
|
* @var array list of slides in the carousel. Each array element represents a single |
|
|
|
|
* slide with the following structure: |
|
|
|
|
* |
|
|
|
@ -89,6 +94,9 @@ class Carousel extends Widget
|
|
|
|
|
*/ |
|
|
|
|
public function renderIndicators() |
|
|
|
|
{ |
|
|
|
|
if ($this->showIndicators === false) { |
|
|
|
|
return ''; |
|
|
|
|
} |
|
|
|
|
$indicators = []; |
|
|
|
|
for ($i = 0, $count = count($this->items); $i < $count; $i++) { |
|
|
|
|
$options = ['data-target' => '#' . $this->options['id'], 'data-slide-to' => $i]; |
|
|
|
|