Back to PhocacartRenderFront class

Method getLinkedTitle

public static
getLinkedTitle
(mixed $link, mixed $item, mixed $route = 'item')

Method getLinkedTitle - Source code

public static function getLinkedTitle($link, $item, $route = 'item')
{
    if ($link == 1) {
        if ($route == 'item') {
            return '<a href="' . Route::_(PhocacartRoute::getItemRoute($item->id, $item->catid, $item->alias, $item->catalias)) . '">' . $item->title . '</a>';
        } else {
            if ($route == 'category') {
                return '<a href="' . Route::_(PhocacartRoute::getCategoryRoute($item->id, $item->alias)) . '">' . $item->title . '</a>';
            }
        }
    } else {
        return $item->title;
    }
    return '';
}