ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMediaPoolSearch Class Reference
+ Inheritance diagram for ilMediaPoolSearch:
+ Collaboration diagram for ilMediaPoolSearch:

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file class.ilMediaPoolSearch.php.

Member Function Documentation

◆ performKeywordSearch()

ilMediaPoolSearch::performKeywordSearch ( )

Definition at line 38 of file class.ilMediaPoolSearch.php.

39 {
40 $this->setFields(array('keyword'));
41
42 $and = $this->__createKeywordAndCondition();
43 $locate = $this->__createLocateString();
44
45
46 $query = "SELECT mep_id, child " .
47 $locate .
48 "FROM mep_item mi " .
49 "JOIN mep_tree ON mi.obj_id = child " .
50 "JOIN il_meta_keyword mk ON foreign_id = mk.obj_id " .
51 $and .
52 "AND obj_type = 'mob'";
53
54 $res = $this->db->query($query);
55 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
56 $this->search_result->addEntry($row->mep_id, 'mep', $this->__prepareFound($row), $row->child);
57 }
59 }
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
$row
$query
foreach($_POST as $key=> $value) $res

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

+ Here is the call graph for this function:

◆ performSearch()

ilMediaPoolSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 19 of file class.ilMediaPoolSearch.php.

20 {
21 $this->setFields(array('title'));
22
23 $and = $this->__createAndCondition();
24 $locate = $this->__createLocateString();
25
26 $query = "SELECT mep_id,obj_id " .
27 $locate .
28 "FROM mep_tree JOIN mep_item ON child = obj_id " .
29 $and;
30
31 $res = $this->db->query($query);
32 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
33 $this->search_result->addEntry($row->mep_id, 'mep', $this->__prepareFound($row), $row->obj_id);
34 }
36 }

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

+ Here is the call graph for this function:

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