ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilLikeShopMetaDataSearch Class Reference
+ Inheritance diagram for ilLikeShopMetaDataSearch:
+ Collaboration diagram for ilLikeShopMetaDataSearch:

Public Member Functions

 __construct ($qp_obj)
 
 __createKeywordWhereCondition ()
 
 __createContributeWhereCondition ()
 
 __createTitleWhereCondition ()
 
 __createDescriptionWhereCondition ()
 
- Public Member Functions inherited from ilShopMetaDataSearch
 __construct ($qp_obj)
 
 setCustomSearchResultObject ($a_search_result_obect)
 
 setFilterShopTopicId ($a_topic_id)
 
 getFilterShopTopicId ()
 
 setMode ($a_mode)
 
 getMode ()
 
 performSearch ()
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$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 ilShopMetaDataSearch
 $mode = ''
 
 $query_parser = null
 
 $db = null
 
- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

Definition at line 35 of file class.ilLikeShopMetaDataSearch.php.

Constructor & Destructor Documentation

◆ __construct()

ilLikeShopMetaDataSearch::__construct (   $qp_obj)

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

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

Member Function Documentation

◆ __createContributeWhereCondition()

ilLikeShopMetaDataSearch::__createContributeWhereCondition ( )

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

References ilShopMetaDataSearch\getFilterShopTopicId().

75  {
76  $where = '';
77  $types = array();
78  $values = array();
79 
80  $where .= ' WHERE (payment_objects.status = 1 OR payment_objects.status = 2) AND (';
81  $counter = 0;
82  foreach($this->query_parser->getQuotedWords() as $word)
83  {
84  if($counter++)
85  {
86  $where .= 'OR';
87  }
88  $where .= $this->db->like(' entity', 'text', '%%'.$word.'%%');
89  }
90 
91  if($this->getFilterShopTopicId() != 0)
92  {
93  $where .= ' AND pt_topic_fk = %s ';
94  $types[] = 'integer';
95  $values[] = $this->getFilterShopTopicId();
96  }
97 
98  return array(
99  'query' => $where.')',
100  'types' => $types,
101  'values' => $values
102  );
103  }
+ Here is the call graph for this function:

◆ __createDescriptionWhereCondition()

ilLikeShopMetaDataSearch::__createDescriptionWhereCondition ( )

Definition at line 136 of file class.ilLikeShopMetaDataSearch.php.

References ilShopMetaDataSearch\getFilterShopTopicId().

137  {
138  $where = '';
139  $types = array();
140  $values = array();
141 
142  $where = ' WHERE (payment_objects.status = 1 OR payment_objects.status = 2) AND (';
143  $counter = 0;
144  foreach($this->query_parser->getQuotedWords() as $word)
145  {
146  if($counter++)
147  {
148  $where .= 'OR';
149  }
150  $where .= $this->db->like(' description', 'text', '%%'.$word.'%%');
151  }
152 
153  if($this->getFilterShopTopicId() != 0)
154  {
155  $where .= ' AND pt_topic_fk = %s ';
156  $types[] = 'integer';
157  $values[] = $this->getFilterShopTopicId();
158  }
159 
160  return array(
161  'query' => $where.')',
162  'types' => $types,
163  'values' => $values
164  );
165  }
+ Here is the call graph for this function:

◆ __createKeywordWhereCondition()

ilLikeShopMetaDataSearch::__createKeywordWhereCondition ( )

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

References ilShopMetaDataSearch\getFilterShopTopicId().

43  {
44  $where = '';
45  $types = array();
46  $values = array();
47 
48  $where .= ' WHERE (payment_objects.status = 1 OR payment_objects.status = 2) AND (';
49  $counter = 0;
50  foreach($this->query_parser->getQuotedWords() as $word)
51  {
52  if($counter++)
53  {
54  $where .= 'OR';
55  }
56 
57  $where .= $this->db->like(' keyword', 'text', '%%'.$word.'%%');
58  }
59 
60  if($this->getFilterShopTopicId() != 0)
61  {
62  $where .= ' AND pt_topic_fk = %s ';
63  $types[] = 'integer';
64  $values[] = $this->getFilterShopTopicId();
65  }
66 
67  return array(
68  'query' => $where.')',
69  'types' => $types,
70  'values' => $values
71  );
72  }
+ Here is the call graph for this function:

◆ __createTitleWhereCondition()

ilLikeShopMetaDataSearch::__createTitleWhereCondition ( )

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

References ilShopMetaDataSearch\getFilterShopTopicId().

106  {
107  $where = '';
108  $types = array();
109  $values = array();
110 
111  $where .= ' WHERE (payment_objects.status = 1 OR payment_objects.status = 2) AND (';
112  $counter = 0;
113  foreach($this->query_parser->getQuotedWords() as $word)
114  {
115  if($counter++)
116  {
117  $where .= 'OR';
118  }
119  $where .= $this->db->like(' title', 'text', '%%'.$word.'%%');
120  }
121 
122  if($this->getFilterShopTopicId() != 0)
123  {
124  $where .= ' AND pt_topic_fk = %s ';
125  $types[] = 'integer';
126  $values[] = $this->getFilterShopTopicId();
127  }
128 
129  return array(
130  'query' => $where.')',
131  'types' => $types,
132  'values' => $values
133  );
134  }
+ Here is the call graph for this function:

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