protected function _initialize(KConfig $config) { //Force the view to prevent a redirect KRequest::set('get.view', 'results'); parent::_initialize($config); }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { parent::_initialize($config); //Force the controller to the information found in the request if ($config->request->view) { $config->controller = $config->request->view; } }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { /* * Re-run the routing and add returned keys to the $_GET request * This is done because Joomla 3 sets the results of the router in $_REQUEST and not in $_GET */ if (JFactory::getApplication()->getCfg('sef')) { $uri = clone JURI::getInstance(); $router = JFactory::getApplication()->getRouter(); $result = $router->parse($uri); foreach ($result as $key => $value) { if (!KRequest::has('get.' . $key)) { KRequest::set('get.' . $key, $value); } } } parent::_initialize($config); //Force the controller to the information found in the request if ($config->request->view) { $config->controller = $config->request->view; } }
/** * Initializes the options for the object * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. * @return void */ protected function _initialize(KConfig $config) { $config->append(array('request_persistent' => true)); parent::_initialize($config); }