Actions

API15

JController/setRedirect

From Joomla! Documentation

< API15:JController
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

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 />