3 declare(strict_types=1);
    61         $this->
tabs = $DIC->tabs();
    62         $this->
help = $DIC->help();
    64         $this->ui_factory = $DIC->ui()->factory();
    65         $this->ui_renderer = $DIC->ui()->renderer();
    77         $next_class = $this->
ctrl->getNextClass($this);
    78         $cmd = $this->
ctrl->getCmd();
    80         switch ($next_class) {
    81             case 'ilobjectcopygui':
    83                 $this->
ctrl->setReturn($this, 
'');
    85                 $this->
ctrl->forwardCommand($cp);
    91                     $cmd = 
"showSavedResults";
   103         parent::prepareOutput();
   112         return self::SEARCH_DETAILS;
   121         return $this->search_cache->getItemFilter();
   130         return $this->search_cache->getMimeFilter();
   139         if ($this->
http->wrapper()->post()->has(
'queryString')) {
   140             $queryString = $this->
http->wrapper()->post()->retrieve(
   142                 $this->
refinery->kindlyTo()->string()
   146         if ($this->
http->wrapper()->post()->has(
'root_id')) {
   147             $root_id = $this->
http->wrapper()->post()->retrieve(
   153         $qp->parseAutoWildcard();
   155         $query = $qp->getQuery();
   157         $this->search_cache->setRoot($root_id);
   159         $this->search_cache->save();
   169         if (!strlen($this->search_cache->getQuery())) {
   181         $filter->loadFromDb();
   184         $searcher->highlight($filter->getResultObjIds());
   187         $presentation->setResults($filter->getResultIds());
   188         $presentation->setSearcher($searcher);
   189         $this->
addPager($filter, 
'max_page');
   190         $presentation->setPreviousNext($this->prev_link, $this->next_link);
   194         if ($presentation->render()) {
   195             $this->tpl->setVariable(
'SEARCH_RESULTS', $presentation->getHTML());
   196         } elseif (strlen($this->search_cache->getQuery())) {
   197             $this->tpl->setOnScreenMessage(
   200                     $this->
lng->txt(
'search_no_match_hint'),
   231         $this->search_cache->deleteCachedEntries();
   236             foreach ($this->search_cache->getItemFilter() as $obj => $value) {
   237                 if (!$filter_query) {
   238                     $filter_query .= 
'+( ';
   240                     $filter_query .= 
'OR';
   242                 $filter_query .= (
' ' . $filter_settings[$obj][
'filter'] . 
' ');
   244             $filter_query .= 
') ';
   250             foreach ($this->search_cache->getMimeFilter() as $mime => $value) {
   252                     $mime_query .= 
'+( ';
   256                 $mime_query .= (
' ' . $filter_settings[$mime][
'filter'] . 
' ');
   266         $filter_query = $filter_query . 
' ' . $mime_query . 
' ' . $cdate_query;
   269         $query = $this->search_cache->getQuery();
   271             $query = 
' +(' . $query . 
')';
   281         $filter->setCandidates($searcher->getResult());
   284         if ($filter->getResultObjIds()) {
   285             $searcher->highlight($filter->getResultObjIds());
   292         $presentation->setResults($filter->getResultIds());
   293         $presentation->setSearcher($searcher);
   296         $this->
addPager($filter, 
'max_page');
   298         $presentation->setPreviousNext($this->prev_link, $this->next_link);
   300         if ($presentation->render()) {
   301             $this->tpl->setVariable(
'SEARCH_RESULTS', $presentation->getHTML());
   303             $this->tpl->setOnScreenMessage(
   306                     $this->
lng->txt(
'search_no_match_hint'),
   318         $this->
help->setScreenIdComponent(
"src_luc");
   320         $this->
tabs->addTarget(
'search', $this->
ctrl->getLinkTarget($this));
   323             $this->
tabs->addTarget(
'search_user', $this->
ctrl->getLinkTargetByClass(
'illuceneusersearchgui'));
   327             $this->
tabs->addTarget(
'search_advanced', $this->
ctrl->getLinkTargetByClass(
'illuceneAdvancedSearchgui'));
   330         $this->
tabs->setTabActive(
'search');
   345         if ($this->
http->wrapper()->post()->has(
'cmd')) {
   347         } elseif ($this->
http->wrapper()->query()->has(
'cmd')) {
   348             $requested_cmd = (array) $this->
http->wrapper()->query()->retrieve(
   350                 $this->
refinery->kindlyTo()->string()
   352             $requested_cmd = [$requested_cmd[0] => 
"Search"];
   356         $new_search = (bool) ($requested_cmd[
"performSearch"] ?? 
false);
   357         $new_filter = (bool) ($requested_cmd[
"performSearchFilter"] ?? 
false);
   358         $new_search_or_filter = $new_search || $new_filter;
   360         if ($this->
http->wrapper()->post()->has(
'root_id')) {
   361             $filter_scope = $this->
http->wrapper()->post()->retrieve(
   366             $filter_scope = (
int) ($this->search_filter_data[
"search_scope"] ?? 
ROOT_FOLDER_ID);
   369         $filter_type_active = (is_null($this->search_filter_data[
"search_type"] ?? null))
   372         $requested_filter_type = (array) ($this->search_filter_data[
"search_type"] ?? []);
   373         $requested_filter_type = array_flip($requested_filter_type);
   374         $requested_filter_type = array_fill_keys(array_keys($requested_filter_type), 
"1");
   377             $this->search_cache->setResultPageNumber($page_number);
   380         if ($this->
http->wrapper()->post()->has(
'term')) {
   381             $term = $this->
http->wrapper()->post()->retrieve(
   383                 $this->
refinery->kindlyTo()->string()
   386             $term = $this->search_cache->getQuery();
   388         $this->search_cache->setQuery($term);
   390         if ($filter_type_active) {
   393                 if ($requested_filter_type[$type] ?? 
false) {
   394                     $filtered[$type] = 1;
   397             $this->search_cache->setItemFilter($filtered);
   402                 if ($requested_filter_type[$type] ?? 
false) {
   406             $this->search_cache->setMimeFilter($mime);
   409         if (!$filter_type_active) {
   411             $this->search_cache->setItemFilter([]);
   412             $this->search_cache->setMimeFilter([]);
   414         if (!isset($this->search_filter_data[
"search_date"])) {
   415             $this->search_cache->setCreationFilter([]);
   419             $this->search_cache->setRoot($filter_scope);
   430         $adm_view_cmp = $adm_cmds = $creation_selector = $adm_view = 
false;
   433         if ((count($this->admin_panel_commands) > 0)) {
   434             foreach ($this->admin_panel_commands as $cmd) {
   435                 $this->tpl->setCurrentBlock(
"lucene_admin_panel_cmd");
   436                 $this->tpl->setVariable(
"LUCENE_PANEL_CMD", $cmd[
"cmd"]);
   437                 $this->tpl->setVariable(
"LUCENE_TXT_PANEL_CMD", $cmd[
"txt"]);
   438                 $this->tpl->parseCurrentBlock();
   444             $this->tpl->setCurrentBlock(
"lucene_adm_view_components");
   446             $this->tpl->setVariable(
"LUCENE_ADM_ALT_ARROW", $this->
lng->txt(
"actions"));
   447             $this->tpl->parseCurrentBlock();
   448             $adm_view_cmp = 
true;
   452         if (is_array($this->admin_view_button)) {
   453             if (is_array($this->admin_view_button)) {
   454                 $this->tpl->setCurrentBlock(
"lucene_admin_button");
   455                 $this->tpl->setVariable(
   456                     "LUCENE_ADMIN_MODE_LINK",
   457                     $this->admin_view_button[
"link"]
   459                 $this->tpl->setVariable(
   460                     "LUCENE_TXT_ADMIN_MODE",
   461                     $this->admin_view_button[
"txt"]
   463                 $this->tpl->parseCurrentBlock();
   465             $this->tpl->setCurrentBlock(
"lucene_admin_view");
   466             $this->tpl->parseCurrentBlock();
   471         if (is_array($this->creation_selector)) {
   472             $this->tpl->setCurrentBlock(
"lucene_add_commands");
   474                 $this->tpl->setVariable(
"LUCENE_ADD_COM_WIDTH", 
'width="1"');
   476             $this->tpl->setVariable(
   477                 "LUCENE_SELECT_OBJTYPE_REPOS",
   478                 $this->creation_selector[
"options"]
   480             $this->tpl->setVariable(
   481                 "LUCENE_BTN_NAME_REPOS",
   482                 $this->creation_selector[
"command"]
   484             $this->tpl->setVariable(
   485                 "LUCENE_TXT_ADD_REPOS",
   486                 $this->creation_selector[
"txt"]
   488             $this->tpl->parseCurrentBlock();
   489             $creation_selector = 
true;
   491         if ($adm_view || $creation_selector) {
   492             $this->tpl->setCurrentBlock(
"lucene_adm_panel");
   494                 $this->tpl->setVariable(
"LUCENE_ADM_TBL_WIDTH", 
'width:"100%";');
   496             $this->tpl->parseCurrentBlock();
   505         $this->admin_panel_commands[] =
   506             array(
"cmd" => $a_cmd, 
"txt" => $a_txt);
   514         $this->admin_view_button =
   515             array(
"link" => $a_link, 
"txt" => $a_txt);
   520         $this->page_form_action = $a_action;
   529         $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.search.html', 
'components/ILIAS/Search');
   530         $this->
renderSearch($this->search_cache->getQuery(), $this->search_cache->getRoot());
   539         $options = $this->search_cache->getCreationFilter();
   541         if (!($options[
'date_start'] ?? 
false) && !($options[
'date_end'] ?? 
false)) {
   547         if (($options[
'date_start'] ?? 
false)) {
   550         if (($options[
'date_end'] ?? 
false)) {
   554         if ($start && is_null($end)) {
   557         } elseif ($end && is_null($start)) {
   558             return '+(cdate:[* TO ' . $end->get(
IL_CAL_DATE) . 
']) ';
 showSearchForm()
Show search form. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
remoteSearch()
Search from main menu. 
 
getDetails()
Needed for base class search form. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
GUI class for the workflow of copying objects. 
 
parse()
parse query string 
 
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
 
static _getInstance(int $a_usr_id)
 
static getInstance(ilLuceneQueryParser $qp)
Get singleton instance. 
 
parseCreationFilter()
Parse creation date. 
 
getMimeDetails()
Needed for base class search form. 
 
handleCommand(string $a_cmd)
 
executeCommand()
Execute Command. 
 
__construct()
Constructor. 
 
prepareOutput()
Add admin panel command. 
 
array $admin_panel_commands
 
setPageFormAction(string $a_action)
 
static resetDetails()
As long as static::resetDetails is not possible this method is final. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
showSavedResults()
Show saved results. 
 
static http()
Fetches the global http state from ILIAS. 
 
Presentation of search results using object list gui. 
 
static getInstance(int $a_user_id)
 
addAdminPanelCommand(string $a_cmd, string $a_txt)
Add a command to the admin panel. 
 
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
performSearch()
Perform search. 
 
search()
Search (button pressed) 
 
renderSearch(string $term, int $root_node=0)
 
initUserSearchCache()
Init user search cache. 
 
ilLuceneAdvancedSearchFields $fields
 
setAdminViewButton(string $a_link, string $a_txt)
Show admin view button. 
 
getStringArrayTransformation()
 
addPager($result, string $a_session_key)
 
__construct(Container $dic, ilPlugin $plugin)
 
fillAdminPanel()
Put admin panel into template: 
 
initPageNumberFromQuery()
 
static clear(string $a_var)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...