ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLikeShopObjectSearch Class Reference
+ Inheritance diagram for ilLikeShopObjectSearch:
+ Collaboration diagram for ilLikeShopObjectSearch:

Public Member Functions

 __construct ($qp_obj)
 
 __createWhereCondition ()
 
- Public Member Functions inherited from ilShopObjectSearch
 __construct ($qp_obj)
 
 setCustomSearchResultObject ($a_search_result_obect)
 
 setFilterShopTopicId ($a_topic_id)
 
 getFilterShopTopicId ()
 
 performSearch ()
 
 __createInStatement ()
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$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 35 of file class.ilLikeShopObjectSearch.php.

Constructor & Destructor Documentation

◆ __construct()

ilLikeShopObjectSearch::__construct (   $qp_obj)

Reimplemented from ilShopObjectSearch.

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

38 {
39 parent::__construct($qp_obj);
40 }

Member Function Documentation

◆ __createWhereCondition()

ilLikeShopObjectSearch::__createWhereCondition ( )

Definition at line 42 of file class.ilLikeShopObjectSearch.php.

43 {
44 global $ilDB;
45
46 $where = '';
47 $types = array();
48 $values = array();
49
50 $where .= 'WHERE (payment_objects.status = 1 OR payment_objects.status = 2) AND (';
51 $counter = 0;
52 foreach($this->query_parser->getQuotedWords() as $word)
53 {
54 if($counter++)
55 {
56 $where .= 'OR';
57 }
58 $concat = $ilDB->concat(
59 array(
60 array('title','text'),
61 array('description','text')));
62 $where .= $this->db->like($concat, 'text', '%%'.$word.'%%');
63
64 }
65 $where .= ') ';
66
67 if($this->getFilterShopTopicId() != 0)
68 {
69 $where .= ' AND pt_topic_fk = %s ';
70 $types[] = 'integer';
71 $values[] = $this->getFilterShopTopicId();
72 }
73
74 return array(
75 'query' => $where,
76 'types' => $types,
77 'values' => $values
78 );
79 }
global $ilDB

References $ilDB, and ilShopObjectSearch\getFilterShopTopicId().

+ Here is the call graph for this function:

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