/** * Get the JRoute object for a redirect to list. * * @param string $append An optional string to append to the route * * @return JRoute The JRoute object */ protected function getRedirectToListRoute($append = '') { // Setup redirect info. if ($contentElement = JFactory::getApplication()->input->get('contentelement')) { $append = '&contentelement=' . $contentElement . $append; } return parent::getRedirectToListRoute($append); }
/** * Forces event_id in all redirections * * Registers a redirection with an optional message. The redirection is * carried out when you use the redirect method. * * @param string $url The URL to redirect to * @param string $msg The message to be pushed to the application * @param string $type The message type to be pushed to the application, e.g. 'error' * * @return JController This object to support chaining */ public function setRedirect($url, $msg = null, $type = null) { $uri = JURI::getInstance($url); $id = $this->input->getInt('event_id', 0); if (!$id) { $formData = $this->input->get('jform', array(), 'array'); if (!isset($formData['event_id']) || !$formData['event_id']) { throw new RuntimeException('event_id is required', 500); } } $uri->setVar('event_id', $id); $url = $uri->toString(); return parent::setRedirect($url, $msg, $type); }
/** * Proxy for getModel. * * @param string $name The name of the model. * @param string $prefix The prefix for the model class name. * * @return redMigratorModel * @since 3.0.3 */ public function getModel($name = '', $prefix = 'redMigratorModel', $config = array()) { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; }
/** * Proxy for getModel. * @since 2.5 */ public function getModel($name = 'Country', $prefix = 'OpenHrmModel', $config = array('ignore_request' => true)) { $model = parent::getModel($name, $prefix, $config); return $model; }
/** * Method to redirect after action. * * @return boolean True if successful, false otherwise. */ public function redirectAfterAction() { if ($returnUrl = $this->input->get('return', '', 'Base64')) { $this->setRedirect(JRoute::_(base64_decode($returnUrl), false)); } else { parent::display(); } }