JController/setRedirect: Difference between revisions
From Joomla! Documentation
No edit summary |
m removing red link to edit, no existant pages |
||
| Line 3: | Line 3: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 52: | Line 52: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Examples=== | ===Examples=== | ||
| Line 67: | Line 67: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API15]] | |||
Revision as of 13:54, 12 May 2013
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
<CodeExamplesForm />