protected function onBeforeDispatch()
{
if (!array_key_exists($this->view, $this->viewNameAliases)) {
return;
}
$this->view = $this->viewNameAliases[$this->view];
$this->container->input->set('view', $this->view);
// Perform HTTP 301 Moved permanently redirection on GET requests if requested to do so
if ($this->permanentAliasRedirectionOnGET && isset($_SERVER['REQUEST_METHOD']) && strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') {
$url = JUri::getInstance();
$url->setVar('view', $this->view);
JFactory::getApplication()->redirect($url, 301);
}
}