3 declare(strict_types=1);
30 $this->
tabs = $DIC->tabs();
31 $this->
help = $DIC->help();
41 $next_class = $this->
ctrl->getNextClass($this);
42 $cmd = $this->
ctrl->getCmd();
45 switch ($next_class) {
46 case "ilpublicuserprofilegui":
49 if ($this->
http->wrapper()->query()->has(
'user_id')) {
50 $user_id = $this->
http->wrapper()->query()->retrieve(
56 $profile->setBackUrl($this->
ctrl->getLinkTarget($this,
'showSavedResults'));
57 $ret = $this->
ctrl->forwardCommand($profile);
58 $this->tpl->setContent($ret);
65 $cmd =
"showSavedResults";
74 parent::prepareOutput();
87 return self::SEARCH_DETAILS;
96 return $this->search_cache->getItemFilter();
106 if ($this->
http->wrapper()->post()->has(
'root_id')) {
107 $root_id = $this->
http->wrapper()->post()->retrieve(
113 if ($this->
http->wrapper()->post()->has(
'queryString')) {
114 $queryString = $this->
http->wrapper()->post()->retrieve(
116 $this->
refinery->kindlyTo()->string()
119 $this->search_cache->setRoot($root_id);
120 $this->search_cache->setQuery($queryString);
121 $this->search_cache->save();
131 if (strlen($this->search_cache->getQuery())) {
145 if (!$this->
form->checkInput()) {
146 $this->search_cache->deleteCachedEntries();
153 $this->search_cache->deleteCachedEntries();
179 $user_table->setLuceneResult($searcher->getResult());
180 $user_table->parseUserIds($searcher->getResult()->getCandidates());
182 $this->tpl->setVariable(
'SEARCH_RESULTS', $user_table->getHTML());
190 $this->
help->setScreenIdComponent(
"src_luc");
192 $this->
tabs->addTarget(
'search', $this->
ctrl->getLinkTargetByClass(
'illucenesearchgui'));
195 $this->
tabs->addTarget(
'search_user', $this->
ctrl->getLinkTargetByClass(
'illuceneusersearchgui'));
202 $fields->getActiveFields()) {
203 $this->
tabs->addTarget(
'search_advanced', $this->
ctrl->getLinkTargetByClass(
'illuceneadvancedsearchgui'));
206 $this->
tabs->setTabActive(
'search_user');
218 $this->search_cache->setResultPageNumber($page_number);
221 if ($this->
http->wrapper()->post()->has(
'term')) {
222 $query = $this->
http->wrapper()->post()->retrieve(
224 $this->
refinery->kindlyTo()->string()
226 $this->search_cache->setQuery(
$query);
227 $this->search_cache->setItemFilter(array());
228 $this->search_cache->setMimeFilter(array());
229 $this->search_cache->save();
241 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.lucene_usr_search.html',
'Services/Search');
243 ilOverlayGUI::initJavascript();
244 $this->tpl->addJavascript(
"./Services/Search/js/Search.js");
246 $this->tpl->setVariable(
'FORM_ACTION', $this->
ctrl->getFormAction($this,
'performSearch'));
248 $this->tpl->setVariable(
"SEARCH_LABEL", $this->
lng->txt(
"search"));
250 $btn->setCommand(
"performSearch");
251 $btn->setCaption(
"search");
252 $this->tpl->setVariable(
"SUBMIT_BTN", $btn->render());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
performSearch()
Perform search.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parse()
parse query string
search()
Search (button pressed)
static _getInstance(int $a_usr_id)
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance.
handleCommand(string $a_cmd)
static resetDetails()
As long as static::resetDetails is not possible this method is final.
executeCommand()
Execute Command.
initUserSearchCache()
Init user search cache.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd)
GUI for Lucene user search
__construct()
Constructor.
remoteSearch()
Search from main menu.
initStandardSearchForm(int $a_mode)
__construct(Container $dic, ilPlugin $plugin)
initPageNumberFromQuery()
static clear(string $a_var)
getType()
Get type of search (details | fast)
showSavedResults()
Show saved results.
showSearchForm()
Show search form.
getDetails()
Needed for base class search form.