API15

JController/setRedirect

From Joomla! Documentation

< API15:JController
Revision as of 08:54, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Set a URL for browser redirection.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

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[edit]

void

Defined in[edit]

libraries/joomla/application/component/controller.php

Importing[edit]

jimport( 'joomla.application.component.controller' );

Source Body[edit]

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[edit]

<CodeExamplesForm />