ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
55  $and = " AND ( ";
56  $counter = 0;
57  foreach ($this->query_parser->getQuotedWords() as $word) {
58  if ($counter++) {
59  $and .= " OR";
60  }
61  #$and .= $concat;
62  #$and .= ("LIKE ('%".$word."%')");
63  #$and .= $ilDB->like($concat,'text','%'.$word.'%');
64  $and .= $ilDB->like('title', 'text', '%' . $word . '%');
65  }
66  return $and . ") ";
67  }
$counter
Create styles array
The data for the language used.
global $ilDB

◆ __createKeywordAndCondition()

ilLikeMediaPoolSearch::__createKeywordAndCondition ( )

Condition for mob keyword search.

Returns

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

References $counter, and $ilDB.

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

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