Route
Route handling class
since |
1.7.0 |
---|
Methods
_
Translates an internal Joomla URL to a humanly readable URL. This method builds links for the current active client.
_(string $url, boolean $xhtml = true, integer $tls = self::TLS_IGNORE, boolean $absolute = false) : string
since |
1.7.0 |
---|
Arguments
- $url
string
Absolute or Relative URI to Joomla resource.- $xhtml
boolean
Replace & by & for XML compliance.- $tls
integer
Secure state for the resolved URI. Use Route::TLS_* constants 0: (default) No change, use the protocol currently used in the request 1: Make URI secure using global secure site URI. 2: Make URI unsecure using the global unsecure site URI.- $absolute
boolean
Return an absolute URL
Response
string
The translated humanly readable URL.
link
Translates an internal Joomla URL to a humanly readable URL.
link(string $client, string $url, boolean $xhtml = true, integer $tls = self::TLS_IGNORE, boolean $absolute = false) : string
NOTE: To build link for active client instead of a specific client, you can use JRoute::_()
throws |
|
---|---|
since |
3.9.0 |
Arguments
- $client
string
The client name for which to build the link.- $url
string
Absolute or Relative URI to Joomla resource.- $xhtml
boolean
Replace & by & for XML compliance.- $tls
integer
Secure state for the resolved URI. Use Route::TLS_* constants 0: (default) No change, use the protocol currently used in the request 1: Make URI secure using global secure site URI. 2: Make URI unsecure using the global unsecure site URI.- $absolute
boolean
Return an absolute URL
Response
string
The translated humanly readable URL.
Constants
TLS_IGNORE
No change, use the protocol currently used.
Value | 0 |
---|---|
since |
3.9.7 |
Type(s)
TLS_FORCE
Make URI secure using http over TLS (https).
Value | 1 |
---|---|
since |
3.9.7 |
Type(s)
TLS_DISABLE
Make URI unsecure using plain http (http).
Value | 2 |
---|---|
since |
3.9.7 |
Type(s)
Properties
_router
The route object so we don't have to keep fetching it.