Back to PhocaDownloadRoute class

Method getFeedRoute

public static
getFeedRoute
(mixed $id, mixed $catid = 0, mixed $sectionid = 0, mixed $type = 'rss')

Method getFeedRoute - Source code

public static function getFeedRoute($id, $catid = 0, $sectionid = 0, $type = 'rss')
{
    $needles = array(
        'categories' => '',
        //'section'  => (int) $sectionid,
        'category' => (int) $catid,
        'file' => (int) $id,
    );
    /*
    		if ($idAlias != '') {
    			$id = $id . ':' . $idAlias;
    		}
    		if ($catidAlias != '') {
    			$catid = $catid . ':' . $catidAlias;
    		}*/
    //Create the link
    $link = 'index.php?option=com_phocadownload&view=feed&id=' . $id . '&format=feed&type=' . $type;
    if ($item = self::_findItem($needles, 1)) {
        if (isset($item->id)) {
            $link .= '&Itemid=' . $item->id;
        }
    }
    return $link;
}