AAAAhelp_search)) { $this->help_search = JRequest::getString('helpsearch'); } return $this->help_search; } /** * Method to get the page * @return string page */ function &getPage() { if (is_null($this->page)) { $page = JRequest::getCmd('page', 'JHELP_START_HERE'); $this->page = JHelp::createUrl($page); } return $this->page; } /** * Method to get the lang tag * @return string lang iso tag */ function &getLangTag() { if (is_null($this->lang_tag)) { $lang = JFactory::getLanguage(); $this->lang_tag = $lang->getTag(); jimport('joomla.filesystem.folder'); if (!JFolder::exists(JPATH_BASE . '/help/' . $this->lang_tag)) { $this->lang_tag = 'en-GB'; // use english as fallback } } return $this->lang_tag; } /** * Method to get the toc * @return array Table of contents */ function &getToc() { if (is_null($this->toc)) { // Get vars $lang_tag = $this->getLangTag(); $help_search = $this->getHelpSearch(); // Get Help files $files = JFolder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$'); $this->toc = array(); foreach($files as $file) { $buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/' . $file); if (preg_match('#