Mage_Reports_Model_Event Class Reference

Inheritance diagram for Mage_Reports_Model_Event:

Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 updateCustomerType ($visitorId, $customerId, $types=null)
 clean ()

Public Attributes

const EVENT_PRODUCT_VIEW = 1
const EVENT_PRODUCT_SEND = 2
const EVENT_PRODUCT_COMPARE = 3
const EVENT_PRODUCT_TO_CART = 4
const EVENT_PRODUCT_TO_WISHLIST = 5
const EVENT_WISHLIST_SHARE = 6

Protected Member Functions

 _construct ()
 _beforeSave ()


Detailed Description

Definition at line 34 of file Event.php.


Member Function Documentation

_beforeSave (  )  [protected]

Before Event save process

Returns:
Mage_Reports_Model_Event

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 57 of file Event.php.

00058     {
00059         $this->setLoggedAt(Mage::getModel('core/date')->gmtDate());
00060         return parent::_beforeSave();
00061     }

_construct (  )  [protected]

Initialize resource

Reimplemented from Varien_Object.

Definition at line 47 of file Event.php.

00048     {
00049         $this->_init('reports/event');
00050     }

clean (  ) 

Clean events (visitors)

Returns:
Mage_Reports_Model_Event

Definition at line 90 of file Event.php.

00091     {
00092         $this->getResource()->clean($this);
00093         return $this;
00094     }

updateCustomerType ( visitorId,
customerId,
types = null 
)

Update customer type after customer login

Parameters:
int $visitorId
int $customerId
array $types
Returns:
Mage_Reports_Model_Event

Definition at line 71 of file Event.php.

00072     {
00073         if (is_null($types)) {
00074             $types = array();
00075             foreach (Mage::getModel('reports/event_type')->getCollection() as $eventType) {
00076                 if ($eventType->getCustomerLogin()) {
00077                     $types[$eventType->getId()] = $eventType->getId();
00078                 }
00079             }
00080         }
00081         $this->getResource()->updateCustomerType($this, $visitorId, $customerId, $types);
00082         return $this;
00083     }


Member Data Documentation

Definition at line 38 of file Event.php.

const EVENT_PRODUCT_SEND = 2

Definition at line 37 of file Event.php.

Definition at line 39 of file Event.php.

Definition at line 40 of file Event.php.

const EVENT_PRODUCT_VIEW = 1

Definition at line 36 of file Event.php.

Definition at line 41 of file Event.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