ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLMContentSearch Class Reference
+ Inheritance diagram for ilLMContentSearch:
+ Collaboration diagram for ilLMContentSearch:

Public Member Functions

 ilLMContentSearch (&$query_parser)
 Constructor public.
performSearch ()
 __createInStatement ()
 __createAndCondition ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id.
 getIdFilter ()
 Get Id filter.
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 $query_parser = null
 $search_result = null
 $object_types

Detailed Description

Definition at line 37 of file class.ilLMContentSearch.php.

Member Function Documentation

ilLMContentSearch::__createAndCondition ( )

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

{
echo "Overwrite me!";
}
ilLMContentSearch::__createInStatement ( )

Definition at line 87 of file class.ilLMContentSearch.php.

References $in, $type, and ilAbstractSearch\getFilter().

Referenced by performSearch().

{
if(!$this->getFilter())
{
return '';
}
else
{
$type = "('";
$type .= implode("','",$this->getFilter());
$type .= "')";
$in = " AND parent_type IN ".$type;
return $in;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLMContentSearch::ilLMContentSearch ( $query_parser)

Constructor public.

Definition at line 44 of file class.ilLMContentSearch.php.

References $ilDB, ilAbstractSearch\$query_parser, and ilAbstractSearch\ilAbstractSearch().

Referenced by ilFulltextLMContentSearch\ilFulltextLMContentSearch(), and ilLikeLMContentSearch\ilLikeLMContentSearch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilLMContentSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 51 of file class.ilLMContentSearch.php.

References $in, $query, $res, $row, ilAbstractSearch\$search_result, __createInStatement(), ilAbstractSearch\__createLocateString(), ilGlossaryDefinition\_lookupTermId(), DB_FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

{
$this->setFields(array('content'));
$where = $this->__createWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT page_id,parent_id,parent_type ".
$locate.
"FROM page_object, lm_data ".
$where.
"AND obj_id = page_id ".
$in;
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
// workaround to get term ids for definition ids (which is not the same!!!)
if ($row->parent_type == "gdf")
{
// it is not a page id anymore now, it is a term id
include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
}
$this->search_result->addEntry($row->parent_id,$row->parent_type,$this->__prepareFound($row),$row->page_id);
}
}

+ Here is the call graph for this function:


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