class MycomponentController extends JControllerLegacy {
/** * Method to display a view. * * @param boolean $cachable If true, the view output will be cached * @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return JController This object to support chaining. * @since 1.5 */ public function display($cachable = false, $urlparams = false) { require_once JPATH_COMPONENT . '/helpers/mycomponent.php'; $view = JFactory::getApplication()->input->getCmd('view', 'organisations'); $task = JFactory::getApplication()->input->getCmd('task', 'display'); JFactory::getApplication()->input->set('view', $view); parent::display($cachable, $urlparams);
return $this; }
}
// No direct accessdefined('_JEXEC') or die;
require_once JPATH_COMPONENT . '/controller.php';
/** * Organisation controller class. */class MycomponentControllerOrganisation extends MycomponentController {
/** * Method to display a view. * * @param boolean $cachable If true, the view output will be cached * @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. * * @return JController This object to support chaining. * @since 1.5 */ public function display($cachable = false, $urlparams = false) { echo 'overriden'; parent::display(); }