### .renderItems()

Renders the carousel items.

@param array $items the item configuration.
553699
protected function renderItems($items) {
		
		foreach ($items as $i => $item) {
			if (!is_array($item)) {
				continue;
			}

			if (isset($item['visible']) && $item['visible'] === false) {
				continue;
			}

			if (!isset($item['itemOptions'])) {
				$item['itemOptions'] = array();
			}

			$classes = array('item');

			if ($i === 0) {
				$classes[] = 'active';
			}

            $classes = implode(' ', $classes);
            if (isset($item['itemOptions']['class'])) {
                $item['itemOptions']['class'] .= ' ' . $classes;
            } else {
                $item['itemOptions']['class'] = $classes;
            }

			echo CHtml::openTag('div', $item['itemOptions']);

			if (isset($item['image'])) {
				if (!isset($item['alt'])) {
					$item['alt'] = '';
				}

				if (!isset($item['imageOptions'])) {
					$item['imageOptions'] = array();
				}

                /**
                 * Is this image should be a link?
                 * @since 2.1.0
                 */
                if (isset($item['link'])) {
                    // Any kind of link options
                    if (!isset($item['linkOptions']) || !is_array($item['linkOptions'])) {
                        $item['linkOptions'] = array();
                    }

                    // URL
                    if(is_array($item['link'])) {
                        $route = isset($item['link'][0]) ? $item['link'][0] : '';
                        $item['linkOptions']['href'] = Yii::app()->createUrl($route, array_splice($item['link'], 1));
                    } else {
                        $item['linkOptions']['href'] = $item['link'];
                    }

                    // Print out 'A' tag
                    echo CHtml::openTag('a', $item['linkOptions']);
                }

				echo CHtml::image($item['image'], $item['alt'], $item['imageOptions']);

                if (isset($item['link'])) {
                    echo '</a>';
                }
			}

			if (!empty($item['caption']) && (isset($item['label']) || isset($item['caption']))) {
				if (!isset($item['captionOptions'])) {
					$item['captionOptions'] = array();
				}

				if (isset($item['captionOptions']['class'])) {
					$item['captionOptions']['class'] .= ' carousel-caption';
				} else {
					$item['captionOptions']['class'] = 'carousel-caption';
				}

				echo CHtml::openTag('div', $item['captionOptions']);

				if (isset($item['label'])) {
					echo '<h3>' . $item['label'] . '</h3>';
				}

				if (isset($item['caption'])) {
					echo '<p>' . $item['caption'] . '</p>';
				}

				echo '</div>';
			}
			echo '</div>';
		}
	}
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
471883
public function update(array $items = [])
    {
        foreach ($items as $key => $item) {
            $this->set($key, $item);
        }
    }
1165363
protected function renderMenuRecursive($items)
	{
		$count=0;
		$n=count($items);
		foreach($items as $item)
		{
			$count++;
			$options=isset($item['itemOptions']) ? $item['itemOptions'] : array();
			$class=array();
			if($item['active'] && $this->activeCssClass!='')
				$class[]=$this->activeCssClass;
			if($count===1 && $this->firstItemCssClass!==null)
				$class[]=$this->firstItemCssClass;
			if($count===$n && $this->lastItemCssClass!==null)
				$class[]=$this->lastItemCssClass;
			if($this->itemCssClass!==null)
				$class[]=$this->itemCssClass;
			if($class!==array())
			{
				if(empty($options['class']))
					$options['class']=implode(' ',$class);
				else
					$options['class'].=' '.implode(' ',$class);
			}

			echo CHtml::openTag('li', $options);

			$menu=$this->renderMenuItem($item);
			if(isset($this->itemTemplate) || isset($item['template']))
			{
				$template=isset($item['template']) ? $item['template'] : $this->itemTemplate;
				echo strtr($template,array('{menu}'=>$menu));
			}
			else
				echo $menu;

			if(isset($item['items']) && count($item['items']))
			{
				echo "\n".CHtml::openTag('ul',isset($item['submenuOptions']) ? $item['submenuOptions'] : $this->submenuHtmlOptions)."\n";
				$this->renderMenuRecursive($item['items']);
				echo CHtml::closeTag('ul')."\n";
			}

			echo CHtml::closeTag('li')."\n";
		}
	}
535636
public static function carousel(array $items, $htmlOptions = array())
    {
        if (!empty($items)) {
            $id = TbArray::getValue('id', $htmlOptions, parent::ID_PREFIX . parent::$count++);
            TbArray::defaultValue('id', $id, $htmlOptions);
            $selector = '#' . $id;
            self::addCssClass('carousel', $htmlOptions);
            if (TbArray::popValue('slide', $htmlOptions, true)) {
                self::addCssClass('slide', $htmlOptions);
            }
            $interval = TbArray::popValue('data-interval', $htmlOptions);
            if ($interval) {
                $htmlOptions['data-interval'] = $interval;
            }
            $pause = TbArray::popValue('data-pause', $htmlOptions);
            if ($pause) {
                $htmlOptions['data-pause'] = $pause;
            }
            $indicatorOptions = TbArray::popValue('indicatorOptions', $htmlOptions, array());
            $innerOptions = TbArray::popValue('innerOptions', $htmlOptions, array());
            self::addCssClass('carousel-inner', $innerOptions);
            $prevOptions = TbArray::popValue('prevOptions', $htmlOptions, array());
            $prevLabel = TbArray::popValue('label', $prevOptions, '&lsaquo;');
            $nextOptions = TbArray::popValue('nextOptions', $htmlOptions, array());
            $nextLabel = TbArray::popValue('label', $nextOptions, '&rsaquo;');
            $hidePrevAndNext = TbArray::popValue('hidePrevAndNext', $htmlOptions, false);
            $output = self::openTag('div', $htmlOptions);
            $output .= self::carouselIndicators($selector, count($items), $indicatorOptions);
            $output .= self::openTag('div', $innerOptions);
            foreach ($items as $i => $itemOptions) {
                if (isset($itemOptions['visible']) && $itemOptions['visible'] === false) {
                    continue;
                }
                if ($i === 0) { // first item should be active
                    self::addCssClass('active', $itemOptions);
                }
                $content = TbArray::popValue('content', $itemOptions, '');
                $image = TbArray::popValue('image', $itemOptions, '');
                $imageOptions = TbArray::popValue('imageOptions', $itemOptions, array());
                $imageAlt = TbArray::popValue('alt', $imageOptions, '');
                if (!empty($image)) {
                    $content = parent::image($image, $imageAlt, $imageOptions);
                }
                $label = TbArray::popValue('label', $itemOptions);
                $caption = TbArray::popValue('caption', $itemOptions);
                $output .= self::carouselItem($content, $label, $caption, $itemOptions);
            }
            $output .= '</div>';
            if (!$hidePrevAndNext) {
                $output .= self::carouselPrevLink($prevLabel, $selector, $prevOptions);
                $output .= self::carouselNextLink($nextLabel, $selector, $nextOptions);
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
497361
public function setItems($items)
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->addItem($item);
        }

        return $this;
    }
1325511
public function addItems(array $items, $append = true)
    {
        $this->_items = $this->mergeItems($this->_items, $items, $append);
    }
402243
public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->fixPaths($item);
        }

        return $items;
    }
139715
protected function setItems($items)
    {
        $this->items = $items instanceof Collection ? $items : Collection::make($items);

        $this->hasMore = $this->items->count() > $this->perPage;

        $this->items = $this->items->slice(0, $this->perPage);
    }
721318
protected function renderItems($items)
	{
		$script = '';
		foreach ($items as $key => $item)
		{
			if(is_array($item))
			{
				$script = $script."'$key':[";
				foreach ($item as $value)
					$script = $script."'$value',";
				$script = $script."],";
			} else
				$script = $script."'$key':'$item',";
		}
		return $script;
	}
351702
function (items) {
            var c,
                j;
            if (this.$renderedItems) {
                for (j = this.$renderedItems.length - 1; j >= 0; j--) {
                    c = this.$renderedItems[j];
                    this.$parent.removeChild(c.component);
                    c.component.destroy();
                }
            }
            if (this.$renderedItemsMap) {
                var itemList;
                for (var key in this.$renderedItemsMap) {
                    if (this.$renderedItemsMap.hasOwnProperty(key)) {
                        itemList = this.$renderedItemsMap[key];
                        for (j = itemList.length - 1; j >= 0; j--) {
                            c = itemList[j];
                            this.$parent.removeChild(c.component);
                            c.component.destroy();
                        }
                    }
                }
            }
            this.$renderedItems = [];
            this.$renderedItemsMap = {};
            this.$indexOffset = 0;

            if (items) {
                for (var i = 0; i < items.length; i++) {
                    this._innerRenderItem(items[i], i);
                }
            }
            this.trigger("on:itemsRendered", {}, this);
        }
470086
protected function denormalize(array $items)
    {
        $shows = [];

        foreach ($items as $show) {
            $show = $this->denormalizeDetailedShow($show);
            $shows[] = $show;
        }

        return $shows;
    }
549959
public function flush(array $items = [])
    {
        if (! $this->callFunc($items)) {
            $this->handleFailure($this->id, $items);
            return false;
        }
        return true;
    }
684331
public function setItems(array $items)
    {
        if (is_array($items)) {
            $i = array();
            foreach ($items as $key => $item) {
                if ($item instanceof PagSeguroItem) {
                    $i[$key] = $item;
                } else {
                    if (is_array($item)) {
                        $i[$key] = new PagSeguroItem($item);
                    }
                }
            }
            $this->items = $i;
        }
    }
1336052
private function _build_items(array $items)
	{
		foreach ($items as $key => $item) {
			$this->_items[$key] = new Element_Item($item, $this, $key);
		}

		return $this;
	}
362934
public function updateItemsData($items)
    {
        $items->each(function ($item) {
            CartItem::where('id', $item->id)->update([
                'name' => $item->name,
                'price' => $item->price,
                'image' => $item->image,
            ]);
        });
    }
586939
public function draw(array $items, string $marker = '*', int $writer = Output::STANDARD): void
	{
		$this->output->write($this->render($items, $marker), $writer);
	}