function display($tpl = null) { $this->setToolBar(); $requiredSetup = array(); //get all files required for setup $setupRules = XiptSetupHelper::getOrderedRules(); //for each file check that setup is required or not & get message a/c to this. foreach ($setupRules as $setup) { //get object of class $setupObject = XiptFactory::getSetupRule($setup['name']); if (!$setupObject->isApplicable()) { continue; } $helpMsg[$setup['name']] = $setupObject->getHelpMsg($setup['name']); $data = $setupObject->getMessage(); $requiredSetup[$setup['name']]['done'] = $data['done']; $requiredSetup[$setup['name']]['message'] = $data['message']; $requiredSetup[$setup['name']]['type'] = $setup['type']; } // to check that setup screen is clean or not $mysess = JFactory::getSession(); $mysess->set('requireSetupCleanUp', false); foreach ($requiredSetup as $req) { if ($req["done"] == false) { $mysess->set('requireSetupCleanUp', true); break; } } $pane =& JPane::getInstance('sliders'); $this->assignRef('pane', $pane); $this->assign('requiredSetup', $requiredSetup); $this->assign('helpMsg', $helpMsg); $this->assign('setupRules', $setupRules); parent::display($tpl); }
function unhook() { //get all files required for setup $setupNames = XiptSetupHelper::getOrderedRules(); foreach ($setupNames as $setup) { //get object of class $setupObject = XiptFactory::getSetupRule($setup['name']); $setupObject->doRevert(); } $msg = XiptText::_('UNHOOKED_SUCCESSFULLY'); $this->setRedirect(XiptRoute::_("index.php?option=com_xipt&view=setup&task=display", false), $msg); return true; }