API15:JController/setRedirect
From Joomla! Documentation
Description
Set a URL for browser redirection.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
setRedirect($url, $msg=null, $type= 'message')
| Parameter Name | Default Value | Description |
|---|---|---|
| $url | URL to redirect to. | |
| $msg | null | Message to display on redirect. Optional, defaults to value set internally by controller, if any. |
| $type | 'message' | Message type. Optional, defaults to 'message'. |
Returns
void
Defined in
libraries/joomla/application/component/controller.php
Importing
jimport( 'joomla.application.component.controller' );
Source Body
function setRedirect( $url, $msg = null, $type = 'message' )
{
$this->_redirect = $url;
if ($msg !== null) {
// controller may have set this directly
$this->_message = $msg;
}
$this->_messageType = $type;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples