Renders the menu items.
@param array $items menu items. Each menu item will be an array with at least two elements: 'label' and 'active'.
It may have three other optional elements: 'items', 'linkOptions' and 'itemOptions'.
354355
protected function renderMenu($items)
	{
		if(count($items))
		{
			echo CHtml::openTag('ul',$this->htmlOptions)."\n";
			$this->renderMenuRecursive($items);
			echo CHtml::closeTag('ul');
		}
	}
1023072
protected function renderItem($item) {
        $linkTemplate = empty($item['items']) ? $this->linkTemplate : $this->itemSubmenuLinkTemplate;
        $labelTemplate = empty($item['items']) ? $this->labelTemplate : $this->itemSubmenuLabelTemplate;

        if (isset($item['url'])) {
            $template = ArrayHelper::getValue($item, 'template', $linkTemplate);

            $params = [
                '{url}' => Html::encode(Url::to($item['url'])),
                '{label}' => $item['label'],
                '{icon}' => isset($item['icon']) ? "<i class='{$item['icon']}'></i>" : '',
            ];

            return strtr($template, $params);
        } else {
            $template = ArrayHelper::getValue($item, 'template', $labelTemplate);

            return strtr($template, [
                '{label}' => $item['label'],
                '{icon}' => isset($item['icon']) ? "<i class='{$item['icon']}'></i>" : '',
            ]);
        }
    }
689295
protected function renderItem($item = [])
    {
        $itemOptions = ArrayHelper::getValue($item, 'options', []);

        $headerOptions = ArrayHelper::getValue($item, 'header', []);
        $headerContent = ArrayHelper::remove($headerOptions, 'content');
        $headerTag = ArrayHelper::remove($headerOptions, 'tag', 'div');

        $bodyOptions = ArrayHelper::getValue($item, 'body', []);
        $bodyContent = ArrayHelper::remove($bodyOptions, 'content', []);
        $bodyTag = ArrayHelper::remove($bodyOptions, 'tag', 'div');

        if (!$headerContent && !$bodyContent) {
            return '';
        }

        $html[] = Html::beginTag('li', $itemOptions);
        if ($headerContent) {
            Html::addCssClass($headerOptions, ['header' => 'collapsible-header']);
            $html[] = Html::tag($headerTag, $headerContent, $headerOptions);
        }
        if ($bodyContent) {
            Html::addCssClass($bodyOptions, ['body' => 'collapsible-body']);
            $html[] = Html::tag($bodyTag, $bodyContent, $bodyOptions);
        }
        $html[] = Html::endTag('li');

        return implode("\n", $html);
    }
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>';
		}
	}
323474
protected function outputFormatTableUser(array $items)
    {
        $header = array(
            $this->text('ID'),
            $this->text('Name'),
            $this->text('E-mail'),
            $this->text('Role'),
            $this->text('Store'),
            $this->text('Enabled'),
            $this->text('Created'),
        );

        $rows = array();

        foreach ($items as $item) {
            $rows[] = array(
                $item['user_id'],
                $item['name'],
                $item['email'],
                $item['role_id'],
                $item['store_id'],
                empty($item['status']) ? $this->text('No') : $this->text('Yes'),
                $this->date($item['created'])
            );
        }

        $this->outputFormatTable($rows, $header);
    }
1058453
public function items(array $items)
    {
        foreach ($items as $uri => $title) {
            list($title, $uri, $liAttr) = $this->fixData($uri, $title);
            $this->item($title, $uri, $liAttr);
        }
        return $this;
    }
300439
protected function outputFormatTableProduct(array $items)
    {
        $header = array(
            $this->text('ID'),
            $this->text('Title'),
            $this->text('Category'),
            $this->text('Brand'),
            $this->text('Product class'),
            $this->text('Price'),
            $this->text('Currency'),
            $this->text('Store'),
            $this->text('User'),
            $this->text('Enabled')
        );

        $rows = array();

        foreach ($items as $item) {
            $rows[] = array(
                $item['product_id'],
                $this->truncate($item['title'], 50),
                $item['category_id'],
                $item['brand_category_id'],
                $item['product_class_id'],
                $item['price'],
                $item['currency'],
                $item['store_id'],
                $item['user_id'],
                empty($item['status']) ? $this->text('No') : $this->text('Yes')
            );
        }

        $this->outputFormatTable($rows, $header);
    }
151853
public function setItems($items)
    {
        if ($items && !$items instanceof ItemBag) {
            $items = new MulticardsItemBag($items);
        }

        return $this->setParameter('items', $items);
    }
830778
public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->setImage($item);
        }

        return $items;
    }
1253318
public function override_children(array $children) {
        $this->children = array();
        foreach ($children as $child) {
            if ($child instanceof custom_menu_item) {
                $this->children[] = $child;
            }
        }
    }
751520
public function setItems(array $items)
    {
        $this->feedManager->get($this->name)->addFromArray($items);

        return $this;
    }
898357
public static function navList($items, $htmlOptions = array())
    {
        foreach ($items as $i => $itemOptions) {
            if (is_string($itemOptions)) {
                continue;
            }
            if (!isset($itemOptions['url']) && !isset($itemOptions['items'])) {
                $label = TbArray::popValue('label', $itemOptions, '');
                $items[$i] = self::menuHeader($label, $itemOptions);
            }
        }
        return self::nav(self::NAV_TYPE_LIST, $items, $htmlOptions);
    }
521788
public function renderItem($item)
    {
        if (isset($item['header'])) {
            Html::addCssClass($item['options'], 'header');
            return Html::tag('div', $item['header'], $item['options']);
        } else {
            if (isset($item['url'])) {
                return Html::a($item['label'], Url::to($item['url']), $item['options']);
            } else {
                return Html::tag('div', $item['label'], $item['options']);
            }
        }
    }
741254
protected function renderItems( array $items )
    {
        $renderedItems = [ ];
        foreach ($items as $index => $item) {
            $renderedItems[] = $this->renderItem( $item );
        }

        return implode( PHP_EOL, $renderedItems );
    }
1363458
protected function formatMenuItems(&$items)
    {
        foreach ( $items as $key => $item ) {
            $itemData = array_only($item->toArray(), $this->selectFields);

            if( ! $item->children->isEmpty() ) {
                $itemData['children'] = $this->sortByField(
                    $this->formatMenuItems($item->children)
                );
            }

            $items[$key] = $itemData;
        }

        return $items;
    }
619273
protected function _render($items, $depth = 0)
    {
        $content = '';
        $formatter = $this->config('formatter');

        foreach ($items as $item) {
            $children = '';
            if (is_array($item)) {
                $item = new Entity($item);
            }

            if ($item->has('children') && !empty($item->children) && $item->expanded) {
                $children = $this->formatTemplate('parent', [
                    'attrs' => $this->templater()->formatAttributes([
                        'class' => ($this->config('dropdown') ? 'dropdown-menu multi-level' : ''),
                        'role' => 'menu'
                    ]),
                    'content' => $this->_render($item->children, $depth + 1)
                ]);
            }

            $this->_index++;
            $info = [
                'index' => $this->_index,
                'total' => $this->_count,
                'active' => $this->Link->isActive($item),
                'depth' => $depth,
                'hasChildren' => !empty($children),
                'children' => $children,
            ];
            $content .= $formatter($item, $info);
        }

        return $content;
    }
94497
protected function outputFormatTableReview(array $items)
    {
        $header = array(
            $this->text('ID'),
            $this->text('User'),
            $this->text('Product'),
            $this->text('Text'),
            $this->text('Status'),
            $this->text('Created')
        );

        $rows = array();

        foreach ($items as $item) {
            $rows[] = array(
                $item['review_id'],
                $item['user_id'],
                $item['product_id'],
                $this->truncate($item['text'], 50),
                $item['status'],
                $this->date($item['created'])
            );
        }

        $this->outputFormatTable($rows, $header);
    }