Back to BaseController class

Method redirect

public bool
redirect
()
Redirects the browser or returns false if no redirect is set.
Returns
  • bool False if no redirect exists.
Since
  • 3.0

Method redirect - Source code

/**
 * Redirects the browser or returns false if no redirect is set.
 *
 * @return  boolean  False if no redirect exists.
 *
 * @since   3.0
 */
public function redirect()
{
    if ($this->redirect) {
        // Enqueue the redirect message
        $this->app->enqueueMessage($this->message, $this->messageType);
        // Execute the redirect
        $this->app->redirect($this->redirect);
    }
    return false;
}