Route
Route handling class
since |
1.7.0 |
---|---|
package |
Joomla CMS |
Methods
_
Translates an internal Joomla URL to a humanly readable URL. This method builds links for the current active client.
_( url, xhtml = true, tls = self::TLS_IGNORE, absolute = false) :
since |
1.7.0 |
---|
Arguments
- url
string
Absolute or Relative URI to Joomla resource.- xhtml
bool
Replace & by & for XML compliance.- tls
int
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
bool
Return an absolute URL
Response
string
The translated humanly readable URL.
link
Translates an internal Joomla URL to a humanly readable URL.
link( client, url, xhtml = true, tls = self::TLS_IGNORE, absolute = false) :
NOTE: To build link for active client instead of a specific client, you can use Route::_()
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
bool
Replace & by & for XML compliance.- tls
int
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
bool
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 |
TLS_FORCE
Make URI secure using http over TLS (https).
Value | 1 |
---|---|
since |
3.9.7 |
TLS_DISABLE
Make URI unsecure using plain http (http).
Value | 2 |
---|---|
since |
3.9.7 |
Properties
_router
The route object so we don't have to keep fetching it.