Mage_Reports_Model_Mysql4_Event_Collection Class Reference

Inheritance diagram for Mage_Reports_Model_Mysql4_Event_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 addStoreFilter (array $storeIds)
 addRecentlyFiler ($typeId, $subjectId, $subtype=0, $ignore=null, $limit=15)

Protected Member Functions

 _construct ()

Protected Attributes

 $_storeIds


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialization here

Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.

Definition at line 44 of file Collection.php.

00045     {
00046         $this->_init('reports/event');
00047     }

addRecentlyFiler ( typeId,
subjectId,
subtype = 0,
ignore = null,
limit = 15 
)

Add recently filter

Parameters:
int $typeId
int $subjectId
int $subtype
int|array $ignore
int $limit
Returns:
Mage_Reports_Model_Mysql4_Event_Collection

Definition at line 71 of file Collection.php.

00072     {
00073         $stores = $this->getResource()->getCurrentStoreIds($this->_storeIds);
00074         $this->_select
00075             ->where('event_type_id=?', $typeId)
00076             ->where('subject_id=?', $subjectId)
00077             ->where('subtype=?', $subtype)
00078             ->where('store_id IN(?)', $stores);
00079         if ($ignore) {
00080             if (is_array($ignore)) {
00081                 $this->_select->where('object_id NOT IN(?)', $ignore);
00082             }
00083             else {
00084                 $this->_select->where('object_id<>?', $ignore);
00085             }
00086         }
00087         $this->_select->group('object_id')
00088             ->limit($limit);
00089         return $this;
00090     }

addStoreFilter ( array storeIds  ) 

Add store ids filter

Parameters:
array $storeIds
Returns:
Mage_Reports_Model_Mysql4_Event_Collection

Definition at line 55 of file Collection.php.

00056     {
00057         $this->_storeIds = $storeIds;
00058         return $this;
00059     }


Member Data Documentation

$_storeIds [protected]

Definition at line 42 of file Collection.php.


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

Generated on Sat Jul 4 17:24:36 2009 for Magento by  doxygen 1.5.8