ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSearchGUI Class Reference

Class ilSearchGUI. More...

+ Inheritance diagram for ilSearchGUI:
+ Collaboration diagram for ilSearchGUI:

Public Member Functions

 ilSearchGUI ()
 Constructor public.
 setType ($a_type)
 Set/get type of search (detail or 'fast' search) public.
 getType ()
 setCombination ($a_combination)
 Set/get combination of search ('and' or 'or') public.
 getCombination ()
 setString ($a_str)
 Set/get search string public.
 getString ()
 setDetails ($a_details)
 Set/get details (object types for details search) public.
 getDetails ()
 getRootNode ()
 setRootNode ($a_node_id)
executeCommand ()
 Control public.
 remoteSearch ()
 autoComplete ()
 Data resource for autoComplete.
 showSearch ()
 showSelectRoot ()
 selectRoot ()
 initStandardSearchForm ()
 Init standard search form.
 showSavedResults ()
 searchInResults ()
 performSearch ()
 Perform search.
 prepareOutput ()
__performDetailsSearch (&$query_parser, &$result)
__parseQueryString ()
 parse query string, using query parser instance
__searchObjects (&$query_parser)
 Search in obect title,desctiption.
__searchMeta (&$query_parser, $a_type)
 Search in object meta data (keyword)
 __getFilter ()
 Get object type for filter (If detail search is enabled)
- Public Member Functions inherited from ilSearchBaseGUI
 ilSearchBaseGUI ()
 Constructor public.
 handleCommand ($a_cmd)
 addToDeskObject ()
 Interface methods.
 removeFromDeskObject ()
 Remove from dektop.
 delete ()
 Show deletion screen.
 cancelDelete ()
 Cancel delete.
 performDelete ()
 Delete objects.
 cut ()
 Interface ilAdministrationCommandHandler.
 link ()
 Interface ilAdministrationCommandHandler.
 paste ()
 Paste.
 showLinkIntoMultipleObjectsTree ()
 Target selection link.
 showMoveIntoObjectTree ()
 Target selection cut.
 performPasteIntoMultipleObjects ()
 Perform paste into multiple objects.
 clear ()
 clear clipboard
 enableAdministrationPanel ()
 Enable administration panel.
 disableAdministrationPanel ()
 Disable administration panel.
 addLocator ()
 Add Locator.

Data Fields

 $root_node
 $combination
 $string
 $type
- Data Fields inherited from ilSearchBaseGUI
 $settings = null
 $ilias = null
 $lng = null
 $tpl = null

Protected Member Functions

 initUserSearchCache ()
 Init user search cache.
- Protected Member Functions inherited from ilSearchBaseGUI
 addPager ($result, $a_session_key)
 Add Pager.
 buildSearchAreaPath ($a_root_node)
 Build path for search area.

Protected Attributes

 $search_cache = null
- Protected Attributes inherited from ilSearchBaseGUI
 $ctrl = null

Detailed Description

Member Function Documentation

ilSearchGUI::__getFilter ( )

Get object type for filter (If detail search is enabled)

Returns
array object types public

Definition at line 646 of file class.ilSearchGUI.php.

References getDetails(), getType(), and SEARCH_DETAILS.

Referenced by __performDetailsSearch(), __searchMeta(), and __searchObjects().

{
if($this->getType() != SEARCH_DETAILS)
{
return false;
}
foreach($this->getDetails() as $key => $detail_type)
{
if(!$detail_type)
{
continue;
}
switch($key)
{
case 'lms':
$filter[] = 'lm';
$filter[] = 'dbk';
$filter[] = 'pg';
$filter[] = 'st';
$filter[] = 'sahs';
$filter[] = 'htlm';
break;
case 'frm':
$filter[] = 'frm';
break;
case 'glo':
$filter[] = 'glo';
break;
case 'exc':
$filter[] = 'exc';
break;
case 'mcst':
$filter[] = 'mcst';
break;
case 'tst':
$filter[] = 'tst';
$filter[] = 'svy';
$filter[] = 'qpl';
$filter[] = 'spl';
break;
case 'mep':
$filter[] = 'mep';
$filter[] = 'mob';
break;
case 'fil':
$filter[] = 'file';
break;
case 'wiki':
$filter[] = 'wpg';
break;
}
}
return $filter ? $filter : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilSearchGUI::__parseQueryString ( )

parse query string, using query parser instance

Returns
object of query parser or error message if an error occured public

Definition at line 575 of file class.ilSearchGUI.php.

References getCombination(), getString(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->getString()));
$query_parser->setCombination($this->getCombination());
$query_parser->parse();
if(!$query_parser->validate())
{
return $query_parser->getMessage();
}
return $query_parser;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilSearchGUI::__performDetailsSearch ( $query_parser,
$result 
)

Definition at line 492 of file class.ilSearchGUI.php.

References $result, $type, __getFilter(), ilObjectSearchFactory\_getExerciseSearchInstance(), ilObjectSearchFactory\_getForumSearchInstance(), ilObjectSearchFactory\_getGlossaryDefinitionSearchInstance(), ilObjectSearchFactory\_getLMContentSearchInstance(), ilObjectSearchFactory\_getMediaPoolSearchInstance(), ilObjectSearchFactory\_getTestSearchInstance(), ilObjectSearchFactory\_getWikiContentSearchInstance(), and getDetails().

Referenced by performSearch().

{
foreach($this->getDetails() as $type => $enabled)
{
if(!$enabled)
{
continue;
}
switch($type)
{
case 'lms':
$content_search =& ilObjectSearchFactory::_getLMContentSearchInstance($query_parser);
$content_search->setFilter($this->__getFilter());
$result->mergeEntries($content_search->performSearch());
break;
case 'frm':
$forum_search =& ilObjectSearchFactory::_getForumSearchInstance($query_parser);
$forum_search->setFilter($this->__getFilter());
$result->mergeEntries($forum_search->performSearch());
break;
case 'glo':
// Glossary term definition pages
$gdf_search->setFilter(array('gdf'));
$result->mergeEntries($gdf_search->performSearch());
// Glossary terms
$result->mergeEntries($gdf_term_search->performSearch());
break;
case 'exc':
$exc_search->setFilter($this->__getFilter());
$result->mergeEntries($exc_search->performSearch());
break;
case 'mcst':
$mcst_search =& ilObjectSearchFactory::_getMediaCastSearchInstance($query_parser);
$result->mergeEntries($mcst_search->performSearch());
break;
case 'tst':
$tst_search =& ilObjectSearchFactory::_getTestSearchInstance($query_parser);
$tst_search->setFilter($this->__getFilter());
$result->mergeEntries($tst_search->performSearch());
break;
case 'mep':
$mep_search->setFilter($this->__getFilter());
$result->mergeEntries($mep_search->performSearch());
// Mob keyword search
$mob_search->setFilter($this->__getFilter());
$result->mergeEntries($mob_search->performKeywordSearch());
break;
case 'wiki':
$wiki_search->setFilter($this->__getFilter());
$result->mergeEntries($wiki_search->performSearch());
/*$result_meta =& $this->__searchMeta($query_parser,'title');
$result->mergeEntries($result_meta);
$result_meta =& $this->__searchMeta($query_parser,'description');
$result->mergeEntries($result_meta);*/
break;
}
}
return $result;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilSearchGUI::__searchMeta ( $query_parser,
  $a_type 
)

Search in object meta data (keyword)

Returns
object result object public

Definition at line 612 of file class.ilSearchGUI.php.

References __getFilter(), ilObjectSearchFactory\_getMetaDataSearchInstance(), getType(), and SEARCH_DETAILS.

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
$meta_search =& ilObjectSearchFactory::_getMetaDataSearchInstance($query_parser);
if($this->getType() == SEARCH_DETAILS)
{
$meta_search->setFilter($this->__getFilter());
}
switch($a_type)
{
case 'keyword':
$meta_search->setMode('keyword');
break;
case 'contribute':
$meta_search->setMode('contribute');
break;
case 'title':
$meta_search->setMode('title');
break;
case 'description':
$meta_search->setMode('description');
break;
}
return $meta_search->performSearch();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilSearchGUI::__searchObjects ( $query_parser)

Search in obect title,desctiption.

Returns
object result object public

Definition at line 594 of file class.ilSearchGUI.php.

References __getFilter(), ilObjectSearchFactory\_getObjectSearchInstance(), getType(), and SEARCH_DETAILS.

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
$obj_search =& ilObjectSearchFactory::_getObjectSearchInstance($query_parser);
if($this->getType() == SEARCH_DETAILS)
{
$obj_search->setFilter($this->__getFilter());
}
return $obj_search->performSearch();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::autoComplete ( )

Data resource for autoComplete.

Reimplemented from ilSearchBaseGUI.

Definition at line 196 of file class.ilSearchGUI.php.

References $_REQUEST, exit, and ilSearchAutoComplete\getList().

{
$q = $_REQUEST["query"];
include_once("./Services/Search/classes/class.ilSearchAutoComplete.php");
echo $list;
}

+ Here is the call graph for this function:

& ilSearchGUI::executeCommand ( )

Control public.

Definition at line 148 of file class.ilSearchGUI.php.

References $cmd, $ilCtrl, ilSearchBaseGUI\handleCommand(), initStandardSearchForm(), initUserSearchCache(), and prepareOutput().

{
global $rbacsystem, $ilCtrl;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case "ilpropertyformgui":
$this->prepareOutput();
$ilCtrl->setReturn($this, "");
return $ilCtrl->forwardCommand($this->form);
break;
case 'ilobjectcopygui':
$this->prepareOutput();
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$this->ctrl->forwardCommand($cp);
break;
default:
if(!$cmd)
{
$cmd = "showSavedResults";
}
$this->prepareOutput();
break;
}
return true;
}

+ Here is the call graph for this function:

ilSearchGUI::getCombination ( )

Definition at line 105 of file class.ilSearchGUI.php.

References SEARCH_OR.

Referenced by __parseQueryString(), and initStandardSearchForm().

{
return $this->combination ? $this->combination : SEARCH_OR;
}

+ Here is the caller graph for this function:

ilSearchGUI::getDetails ( )

Definition at line 129 of file class.ilSearchGUI.php.

Referenced by __getFilter(), __performDetailsSearch(), initStandardSearchForm(), and performSearch().

{
return $this->details ? $this->details : array();
}

+ Here is the caller graph for this function:

ilSearchGUI::getRootNode ( )

Definition at line 135 of file class.ilSearchGUI.php.

Referenced by performSearch(), and showSavedResults().

{
return $this->root_node ? $this->root_node : ROOT_FOLDER_ID;
}

+ Here is the caller graph for this function:

ilSearchGUI::getString ( )

Definition at line 117 of file class.ilSearchGUI.php.

References $string.

Referenced by __parseQueryString(), and initStandardSearchForm().

{
return $this->string;
}

+ Here is the caller graph for this function:

ilSearchGUI::getType ( )

Definition at line 93 of file class.ilSearchGUI.php.

References SEARCH_FAST.

Referenced by __getFilter(), __searchMeta(), __searchObjects(), initStandardSearchForm(), and performSearch().

{
return $this->type ? $this->type : SEARCH_FAST;
}

+ Here is the caller graph for this function:

ilSearchGUI::ilSearchGUI ( )

Constructor public.

Definition at line 40 of file class.ilSearchGUI.php.

References $_POST, $_SESSION, ilSearchBaseGUI\$lng, $t, ilSearchBaseGUI\ilSearchBaseGUI(), initStandardSearchForm(), setCombination(), setDetails(), setString(), and setType().

{
global $ilUser, $lng;
$lng->loadLanguageModule("search");
$this->obj_types = array (
"lms" => $lng->txt("learning_resources"),
"glo" => $lng->txt("objs_glo"),
"wiki" => $lng->txt("objs_wiki"),
"mcst" => $lng->txt("objs_mcst"),
"fil" => $lng->txt("objs_file"),
"frm" => $lng->txt("objs_frm"),
"exc" => $lng->txt("objs_exc"),
"tst" => $lng->txt("search_tst_svy"),
"mep" => $lng->txt("objs_mep")
);
// put form values into "old" post variables
$this->form->checkInput();
reset($this->obj_types);
$new_search = isset($_POST['cmd']['performSearch']) ? true : false;
foreach($this->obj_types as $k => $t)
{
$_POST["search"]["details"][$k] = $_POST[$k];
}
$_POST["search"]["string"] = $_POST["term"];
$_POST["search"]["combination"] = $_POST["combination"];
$_POST["search"]["type"] = $_POST["type"];
$_SESSION['search_root'] = $_POST["area"];
$this->root_node = $_SESSION['search_root'] ? $_SESSION['search_root'] : ROOT_FOLDER_ID;
$this->setType($_POST['search']['type'] ? $_POST['search']['type'] : $_SESSION['search']['type']);
$this->setCombination($_POST['search']['combination'] ? $_POST['search']['combination'] : $_SESSION['search']['combination']);
$this->setString($_POST['search']['string'] ? $_POST['search']['string'] : $_SESSION['search']['string']);
#$this->setDetails($_POST['search']['details'] ? $_POST['search']['details'] : $_SESSION['search']['details']);
$this->setDetails($new_search ? $_POST['search']['details'] : $_SESSION['search']['details']);
}

+ Here is the call graph for this function:

ilSearchGUI::initStandardSearchForm ( )

Init standard search form.

Definition at line 250 of file class.ilSearchGUI.php.

References $ilCtrl, ilSearchBaseGUI\$lng, $t, getCombination(), getDetails(), getString(), getType(), SEARCH_AND, SEARCH_DETAILS, SEARCH_FAST, ilTextInputGUI\setMaxLength(), ilRepositorySelectorInputGUI\setSelectText(), and ilRadioGroupInputGUI\setValue().

Referenced by executeCommand(), ilSearchGUI(), and showSearch().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
// search term
$ti = new ilTextInputGUI($lng->txt("search_search_term"), "term");
$ti->setMaxLength(200);
$ti->setSize(30);
$ti->setValue($this->getString());
$dsSchema = array("resultsList" => 'response.results',
"fields" => array('term'));
$ti->setDataSource($ilCtrl->getLinkTarget($this, "autoComplete", "", false, false));
$ti->setDataSourceSchema($dsSchema);
$ti->setDataSourceResultFormat($dsFormatCallback);
$ti->setDataSourceDelimiter($dsDelimiter);
$this->form->addItem($ti);
// term combination
$radg = new ilRadioGroupInputGUI($lng->txt("search_term_combination"),
"combination");
$radg->setValue(($this->getCombination() == SEARCH_AND) ? "and" : "or");
$op1 = new ilRadioOption($lng->txt("search_any_word"), "or");
$radg->addOption($op1);
$op2 = new ilRadioOption($lng->txt("search_all_words"), "and");
$radg->addOption($op2);
$this->form->addItem($radg);
// search area
include_once("./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
$ti = new ilRepositorySelectorInputGUI($lng->txt("search_area"), "area");
$ti->setSelectText($lng->txt("search_select_search_area"));
$this->form->addItem($ti);
$ti->readFromSession();
// search type
$radg = new ilRadioGroupInputGUI($lng->txt("search_type"), "type");
$op1 = new ilRadioOption($lng->txt("search_fast_info"), SEARCH_FAST);
$radg->addOption($op1);
$op2 = new ilRadioOption($lng->txt("search_details_info"), SEARCH_DETAILS);
// resource types
$details = $this->getDetails();
reset($this->obj_types);
foreach ($this->obj_types as $k => $t)
{
$cb = new ilCheckboxInputGUI($t, $k);
$cb->setChecked($details[$k]);
$op2->addSubItem($cb);
}
$radg->addOption($op2);
$this->form->addItem($radg);
// search command
$this->form->addCommandButton("performSearch", $lng->txt("search"));
$this->form->setTitle($lng->txt("search"));
$this->form->setFormAction($ilCtrl->getFormAction($this,'performSearch'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::initUserSearchCache ( )
protected

Init user search cache.

private

Definition at line 717 of file class.ilSearchGUI.php.

References $_GET, $_POST, ilUserSearchCache\_getInstance(), ilUserSearchCache\DEFAULT_SEARCH, and ilUtil\stripSlashes().

Referenced by executeCommand().

{
global $ilUser;
include_once('Services/Search/classes/class.ilUserSearchCache.php');
$this->search_cache = ilUserSearchCache::_getInstance($ilUser->getId());
$this->search_cache->switchSearchType(ilUserSearchCache::DEFAULT_SEARCH);
if($_GET['page_number'])
{
$this->search_cache->setResultPageNumber((int) $_GET['page_number']);
}
if(isset($_POST['cmd']['performSearch']))
{
$this->search_cache->setQuery(ilUtil::stripSlashes($_POST['term']));
$this->search_cache->save();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::performSearch ( )

Perform search.

Definition at line 365 of file class.ilSearchGUI.php.

References $_GET, $_SESSION, $result, __parseQueryString(), __performDetailsSearch(), __searchMeta(), __searchObjects(), ilSearchBaseGUI\addPager(), getDetails(), getRootNode(), getType(), ilSearchResultPresentation\MODE_STANDARD, ilSearchResult\read(), SEARCH_DETAILS, ilUtil\sendInfo(), and showSearch().

Referenced by remoteSearch(), and searchInResults().

{
global $ilUser;
if(!isset($_GET['page_number']) and $this->search_mode != 'in_results' )
{
unset($_SESSION['max_page']);
$this->search_cache->deleteCachedEntries();
}
if($this->getType() == SEARCH_DETAILS and !$this->getDetails())
{
ilUtil::sendInfo($this->lng->txt('search_choose_object_type'));
$this->showSearch();
return false;
}
// Step 1: parse query string
if(!is_object($query_parser =& $this->__parseQueryString()))
{
ilUtil::sendInfo($query_parser);
$this->showSearch();
return false;
}
// Step 2: perform object search. Get an ObjectSearch object via factory. Depends on fulltext or like search type.
$result =& $this->__searchObjects($query_parser);
// Step 3: perform meta keyword search. Get an MetaDataSearch object.
$result_meta =& $this->__searchMeta($query_parser,'keyword');
$result->mergeEntries($result_meta);
$result_meta =& $this->__searchMeta($query_parser,'contribute');
$result->mergeEntries($result_meta);
$result_meta =& $this->__searchMeta($query_parser,'title');
$result->mergeEntries($result_meta);
$result_meta =& $this->__searchMeta($query_parser,'description');
$result->mergeEntries($result_meta);
// Perform details search in object specific tables
if($this->getType() == SEARCH_DETAILS)
{
$result = $this->__performDetailsSearch($query_parser,$result);
}
// Step 5: Search in results
if($this->search_mode == 'in_results')
{
include_once 'Services/Search/classes/class.ilSearchResult.php';
$old_result_obj = new ilSearchResult($ilUser->getId());
$old_result_obj->read();
$result->diffEntriesFromResult($old_result_obj);
}
// Step 4: merge and validate results
$result->filter($this->getRootNode(),$query_parser->getCombination() == 'and');
$result->save();
$this->showSearch();
if(!count($result->getResults()))
{
ilUtil::sendInfo($this->lng->txt('search_no_match'));
}
if($result->isLimitReached())
{
#$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
#ilUtil::sendInfo($message);
}
// Step 6: show results
$this->addPager($result,'max_page');
include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
$presentation->setResults($result->getResultsForPresentation());
$presentation->setSubitemIds($result->getSubitemIds());
$presentation->setPreviousNext($this->prev_link, $this->next_link);
if($presentation->render())
{
// $this->tpl->setVariable('SEARCH_RESULTS',$presentation->getHTML());
$this->tpl->setVariable('RESULTS_TABLE',$presentation->getHTML(true));
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::prepareOutput ( )

Reimplemented from ilSearchBaseGUI.

Definition at line 460 of file class.ilSearchGUI.php.

Referenced by executeCommand().

{
global $ilTabs;
// $this->tpl->addBlockFile("TABS","tabs","tpl.tabs.html");
$ilTabs->addTab("search", $this->lng->txt("search"),
$this->ctrl->getLinkTarget($this));
/*$this->tpl->setCurrentBlock("tab");
$this->tpl->setVariable("TAB_TYPE","tabactive");
$this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTarget($this));
$this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search"));
$this->tpl->parseCurrentBlock();*/
if (!$this->settings->getHideAdvancedSearch())
{
/*$this->tpl->setCurrentBlock("tab");
$this->tpl->setVariable("TAB_TYPE","tabinactive");
$this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('iladvancedsearchgui'));
$this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search_advanced"));
$this->tpl->parseCurrentBlock();*/
$ilTabs->addTab("adv_search", $this->lng->txt("search_advanced"),
$this->ctrl->getLinkTargetByClass('iladvancedsearchgui'));
}
$ilTabs->activateTab("search");
}

+ Here is the caller graph for this function:

ilSearchGUI::remoteSearch ( )

Definition at line 185 of file class.ilSearchGUI.php.

References $_POST, performSearch(), setRootNode(), setString(), and ilUtil\stripSlashes().

{
$this->setString(ilUtil::stripSlashes($_POST['queryString']));
$this->setRootNode((int) $_POST['root_id']);
$this->performSearch();
}

+ Here is the call graph for this function:

ilSearchGUI::searchInResults ( )

Definition at line 351 of file class.ilSearchGUI.php.

References $_SESSION, and performSearch().

{
$this->search_mode = 'in_results';
$this->search_cache->setResultPageNumber(1);
unset($_SESSION['max_page']);
$this->performSearch();
return true;
}

+ Here is the call graph for this function:

ilSearchGUI::selectRoot ( )

Definition at line 239 of file class.ilSearchGUI.php.

References $_GET, setRootNode(), and showSavedResults().

{
$this->setRootNode((int) $_GET['root_id']);
$this->showSavedResults();
return true;
}

+ Here is the call graph for this function:

ilSearchGUI::setCombination (   $a_combination)

Set/get combination of search ('and' or 'or') public.

Definition at line 101 of file class.ilSearchGUI.php.

References $_SESSION.

Referenced by ilSearchGUI().

{
$_SESSION['search']['combination'] = $this->combination = $a_combination;
}

+ Here is the caller graph for this function:

ilSearchGUI::setDetails (   $a_details)

Set/get details (object types for details search) public.

Definition at line 125 of file class.ilSearchGUI.php.

References $_SESSION.

Referenced by ilSearchGUI().

{
$_SESSION['search']['details'] = $this->details = $a_details;
}

+ Here is the caller graph for this function:

ilSearchGUI::setRootNode (   $a_node_id)

Definition at line 139 of file class.ilSearchGUI.php.

References $_SESSION.

Referenced by remoteSearch(), and selectRoot().

{
$_SESSION['search_root'] = $this->root_node = $a_node_id;
}

+ Here is the caller graph for this function:

ilSearchGUI::setString (   $a_str)

Set/get search string public.

Definition at line 113 of file class.ilSearchGUI.php.

References $_SESSION.

Referenced by ilSearchGUI(), and remoteSearch().

{
$_SESSION['search']['string'] = $this->string = $a_str;
}

+ Here is the caller graph for this function:

ilSearchGUI::setType (   $a_type)

Set/get type of search (detail or 'fast' search) public.

Definition at line 89 of file class.ilSearchGUI.php.

References $_SESSION.

Referenced by ilSearchGUI().

{
$_SESSION['search']['type'] = $this->type = $a_type;
}

+ Here is the caller graph for this function:

ilSearchGUI::showSavedResults ( )

Definition at line 316 of file class.ilSearchGUI.php.

References ilSearchBaseGUI\addPager(), getRootNode(), ilSearchResultPresentation\MODE_STANDARD, ilSearchResult\read(), and showSearch().

Referenced by selectRoot().

{
global $ilUser;
// Read old result sets
include_once 'Services/Search/classes/class.ilSearchResult.php';
$result_obj = new ilSearchResult($ilUser->getId());
$result_obj->read();
$result_obj->filterResults($this->getRootNode());
$this->showSearch();
// Show them
if(count($result_obj->getResults()))
{
$this->addPager($result_obj,'max_page');
include_once './Services/Search/classes/class.ilSearchResultPresentation.php';
$presentation->setResults($result_obj->getResultsForPresentation());
$presentation->setSubitemIds($result_obj->getSubitemIds());
$presentation->setPreviousNext($this->prev_link, $this->next_link);
#$presentation->setSearcher($searcher);
if($presentation->render())
{
// $this->tpl->setVariable('SEARCH_RESULTS',$presentation->getHTML());
$this->tpl->setVariable('RESULTS_TABLE',$presentation->getHTML(true));
}
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::showSearch ( )

Definition at line 206 of file class.ilSearchGUI.php.

References $ilCtrl, and initStandardSearchForm().

Referenced by performSearch(), and showSavedResults().

{
global $ilLocator, $ilCtrl;
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.search.html','Services/Search');
$this->tpl->setVariable("FORM", $this->form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSearchGUI::showSelectRoot ( )

Definition at line 219 of file class.ilSearchGUI.php.

References $_GET, ilUtil\sendInfo(), and ilExplorer\setExpand().

{
global $tree;
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.search_root_selector.html','Services/Search');
include_once 'Services/Search/classes/class.ilSearchRootSelector.php';
ilUtil::sendInfo($this->lng->txt('search_area_info'));
$exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this,'showSelectRoot'));
$exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $tree->readRootId());
$exp->setExpandTarget($this->ctrl->getLinkTarget($this,'showSelectRoot'));
// build html-output
$exp->setOutput(0);
$this->tpl->setVariable("EXPLORER",$exp->getOutput());
}

+ Here is the call graph for this function:

Field Documentation

ilSearchGUI::$combination

Definition at line 31 of file class.ilSearchGUI.php.

ilSearchGUI::$root_node

Definition at line 30 of file class.ilSearchGUI.php.

ilSearchGUI::$search_cache = null
protected

Definition at line 28 of file class.ilSearchGUI.php.

ilSearchGUI::$string

Definition at line 32 of file class.ilSearchGUI.php.

Referenced by getString().

ilSearchGUI::$type

Definition at line 33 of file class.ilSearchGUI.php.

Referenced by __performDetailsSearch().


The documentation for this class was generated from the following file: