/** * Show usr table * @return * @param object $a_usr_ids */ protected function showSearchUserTable($a_usr_ids, $a_parent_cmd) { $is_in_admin = $_REQUEST['baseClass'] == 'ilAdministrationGUI'; if ($is_in_admin) { // remember link target to admin search gui (this) $_SESSION["usr_search_link"] = $this->ctrl->getLinkTarget($this, 'show'); } include_once './Services/Search/classes/class.ilRepositoryUserResultTableGUI.php'; $table = new ilRepositoryUserResultTableGUI($this, $a_parent_cmd, $is_in_admin); if (count($this->add_options)) { $table->addMultiItemSelectionButton('selectedCommand', $this->add_options, 'handleMultiCommand', $this->lng->txt('execute')); } else { $table->addMultiCommand('addUser', $this->lng->txt('btn_add')); } $table->parseUserIds($a_usr_ids); $this->tpl->setVariable('RES_TABLE', $table->getHTML()); }
/** * Perform search */ protected function performSearch() { include_once './Services/Search/classes/Lucene/class.ilLuceneSearcher.php'; include_once './Services/Search/classes/Lucene/class.ilLuceneQueryParser.php'; $qp = new ilLuceneQueryParser($this->search_cache->getQuery()); $qp->parse(); $searcher = ilLuceneSearcher::getInstance($qp); $searcher->setType(ilLuceneSearcher::TYPE_USER); $searcher->search(); $this->showSearchForm(); include_once './Services/Search/classes/class.ilRepositoryUserResultTableGUI.php'; $user_table = new ilRepositoryUserResultTableGUI($this, 'performSearch', false, ilRepositoryUserResultTableGUI::TYPE_GLOBAL_SEARCH); $user_table->setLuceneResult($searcher->getResult()); $user_table->parseUserIds($searcher->getResult()->getCandidates()); $GLOBALS['tpl']->setVariable('SEARCH_RESULTS', $user_table->getHTML()); return true; }