class RouteHelper

Route Helper

A class providing basic routing for urls that are for content types found in the #content_types table and rows found in the #ucm_content table.

Methods

string
getRoute( integer $id, string $typealias, string $link = '', string $language = null, integer $catid = null)

A method to get the route for a specific item

static  string
getCategoryRoute( mixed $catid, mixed $language, string $extension = '')

Fetches the category route

Details

string getRoute( integer $id, string $typealias, string $link = '', string $language = null, integer $catid = null)

A method to get the route for a specific item

Parameters

integer $id Value of the primary key for the item in its content table
string $typealias The type_alias for the item being routed. Of the form extension.view.
string $link The link to be routed
string $language The language of the content for multilingual sites
integer $catid Optional category id

Return Value

string The route of the item

static string getCategoryRoute( mixed $catid, mixed $language, string $extension = '')

Fetches the category route

Parameters

mixed $catid Category ID or \JCategoryNode instance
mixed $language Language code
string $extension Extension to lookup

Return Value

string

Exceptions

InvalidArgumentException