Back to PhocaGalleryRenderTabs class

Method renderTabsHeader

public
renderTabsHeader
(mixed $items)

Method renderTabsHeader - Source code

public function renderTabsHeader($items)
{
    $o = array();
    $o[] = '<ul class="phTabsUl">';
    if (!empty($items)) {
        $i = 0;
        foreach ($items as $k => $v) {
            $activeO = '';
            if ($this->activeTab == '' && $i == 0) {
                $activeO = ' active';
            } else {
                if ($this->activeTab == $v['id']) {
                    $activeO = ' active';
                }
            }
            $o[] = '<li class="phTabsLi"><a class="phTabsA phTabsHeader' . $activeO . '" id="phTabId' . $this->id . 'Item' . $v['id'] . '">' . '<svg class="ph-si ph-si-tab ph-si-' . $v['icon'] . '"><use xlink:href="#ph-si-' . $v['icon'] . '"></use></svg>' . ' ' . $v['title'] . '</a></li>';
            $i++;
        }
    }
    $o[] = '</ul>';
    return implode("\n", $o);
}