Back to PhocaGalleryRenderFront class

Method renderFeedIcon

public static
renderFeedIcon
(mixed $type = 'categories', mixed $paramsIcons = true, mixed $catid = 0, mixed $catidAlias = '')

Method renderFeedIcon - Source code

public static function renderFeedIcon($type = 'categories', $paramsIcons = true, $catid = 0, $catidAlias = '')
{
    $paramsC = ComponentHelper::getParams('com_phocagallery');
    $df = $paramsC->get('display_feed', 1);
    if ($type == 'categories' && $df != 1 && $df != 2) {
        return '';
    }
    if ($type == 'category' && $df != 1 && $df != 3) {
        return '';
    }
    $url = PhocaGalleryRoute::getFeedRoute($type, $catid, $catidAlias);
    if ($paramsIcons) {
        //$text = HTMLHelper::_('image', 'media/com_phocagallery/images/icon-feed.png', JText::_('COM_PHOCAGALLERY_RSS'));
        $text = PhocaGalleryRenderFront::renderIcon('feed', 'media/com_phocagallery/images/icon-feed.png', Text::_('COM_PHOCAGALLERY_RSS'));
    } else {
        $text = Text::_('COM_PHOCAGALLERY_RSS');
    }
    $output = '<a href="' . Route::_($url) . '" title="' . Text::_('COM_PHOCAGALLERY_RSS') . '">' . $text . '</a>';
    return $output;
}