ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilLikeMediaPoolSearch Class Reference
+ Inheritance diagram for ilLikeMediaPoolSearch:
+ Collaboration diagram for ilLikeMediaPoolSearch:

Public Member Functions

 __createAndCondition ()
 
 __createKeywordAndCondition ()
 Condition for mob keyword search. More...
 
- Public Member Functions inherited from ilMediaPoolSearch
performSearch ()
 
 performKeywordSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor 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 37 of file class.ilLikeMediaPoolSearch.php.

Member Function Documentation

◆ __createAndCondition()

ilLikeMediaPoolSearch::__createAndCondition ( )

Definition at line 39 of file class.ilLikeMediaPoolSearch.php.

References $counter, $ilDB, and array.

40  {
41  global $ilDB;
42 
43  /*
44  $concat = " CONCAT(";
45  $concat .= 'title,description';
46  $concat .= ") ";
47  */
48  $concat = $ilDB->concat(
49  array(
50  array('title','text')
51  ));
52 
53 
54  $and = " AND ( ";
55  $counter = 0;
56  foreach($this->query_parser->getQuotedWords() as $word)
57  {
58  if($counter++)
59  {
60  $and .= " OR";
61  }
62  #$and .= $concat;
63  #$and .= ("LIKE ('%".$word."%')");
64  #$and .= $ilDB->like($concat,'text','%'.$word.'%');
65  $and .= $ilDB->like('title','text','%'.$word.'%');
66  }
67  return $and.") ";
68  }
$counter
Create styles array
The data for the language used.
global $ilDB

◆ __createKeywordAndCondition()

ilLikeMediaPoolSearch::__createKeywordAndCondition ( )

Condition for mob keyword search.

Returns

Definition at line 74 of file class.ilLikeMediaPoolSearch.php.

References $counter, and $ilDB.

75  {
76  global $ilDB;
77 
78  $concat = ' keyword ';
79 
80  $and = " WHERE ";
81  $counter = 0;
82  foreach($this->query_parser->getQuotedWords() as $word)
83  {
84  if($counter++)
85  {
86  $and .= " OR ";
87  }
88  $and .= $ilDB->like($concat,'text','%'.$word.'%');
89  }
90  return $and;
91  }
$counter
global $ilDB

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