ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilShopObjectSearch Class Reference
+ Inheritance diagram for ilShopObjectSearch:
+ Collaboration diagram for ilShopObjectSearch:

Public Member Functions

 __construct ($qp_obj)
 setCustomSearchResultObject ($a_search_result_obect)
 setFilterShopTopicId ($a_topic_id)
 getFilterShopTopicId ()
 performSearch ()
 __createInStatement ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Private Attributes

 $filter_shop_topic_id = 0

Additional Inherited Members

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

Detailed Description

Definition at line 33 of file class.ilShopObjectSearch.php.

Constructor & Destructor Documentation

ilShopObjectSearch::__construct (   $qp_obj)

Reimplemented in ilFulltextShopObjectSearch, and ilLikeShopObjectSearch.

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

References ilAbstractSearch\setFields().

{
$this->setFields(array('title', 'description'));
}

+ Here is the call graph for this function:

Member Function Documentation

ilShopObjectSearch::__createInStatement ( )

Definition at line 86 of file class.ilShopObjectSearch.php.

References $in.

Referenced by performSearch().

{
$type = "('";
$type .= implode("','",$this->object_types);
$type .= "')";
$in = " AND type IN ".$type;
return $in;
}

+ Here is the caller graph for this function:

ilShopObjectSearch::getFilterShopTopicId ( )

Definition at line 52 of file class.ilShopObjectSearch.php.

References $filter_shop_topic_id.

Referenced by performSearch().

+ Here is the caller graph for this function:

ilShopObjectSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 57 of file class.ilShopObjectSearch.php.

References $in, $res, ilAbstractSearch\$search_result, __createInStatement(), ilAbstractSearch\__createLocateString(), DB_FETCHMODE_OBJECT, and getFilterShopTopicId().

{
$where = $this->__createWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT object_data.obj_id,object_data.type ".$locate."
FROM payment_objects
INNER JOIN object_reference ON object_reference.ref_id = payment_objects.ref_id
INNER JOIN object_data ON object_data.obj_id = object_reference.obj_id ";
if($this->getFilterShopTopicId() != 0)
{
$where .= " AND pt_topic_fk = ".$this->db->quote($this->getFilterShopTopicId())." ";
}
$query .= $where." ".$in.' ';
$query .= " GROUP BY object_data.obj_id ";
$query .= " ORDER BY object_data.obj_id DESC ";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->obj_id,$row->type,$this->__prepareFound($row));
}
}

+ Here is the call graph for this function:

ilShopObjectSearch::setCustomSearchResultObject (   $a_search_result_obect)

Definition at line 43 of file class.ilShopObjectSearch.php.

{
$this->search_result = $a_search_result_obect;
}
ilShopObjectSearch::setFilterShopTopicId (   $a_topic_id)

Definition at line 48 of file class.ilShopObjectSearch.php.

{
$this->filter_shop_topic_id = $a_topic_id;
}

Field Documentation

ilShopObjectSearch::$filter_shop_topic_id = 0
private

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

Referenced by getFilterShopTopicId().


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