Base Controller

This method redirects the browser or returns false if no redirect is set.

  • return boolean False if no redirect exists.
public function redirect()
{
if ($this->redirect)
{
$app = \JFactory::getApplication();

// Enqueue the redirect message
$app->enqueueMessage($this->message, $this->messageType);

// Execute the redirect
$app->redirect($this->redirect);
}

return false;
}