Mage_Wishlist_Model_Mysql4_Wishlist Class Reference

Inheritance diagram for Mage_Wishlist_Model_Mysql4_Wishlist:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 getCustomerIdFieldName ()
 setCustomerIdFieldName ($fieldName)
 fetchItemsCount (Mage_Wishlist_Model_Wishlist $wishlist)

Protected Member Functions

 _construct ()

Protected Attributes

 $_itemsCount = null
 $_customerIdFieldName = 'customer_id'


Detailed Description

Definition at line 35 of file Wishlist.php.


Member Function Documentation

_construct (  )  [protected]

Resource initialization

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 42 of file Wishlist.php.

00043     {
00044         $this->_init('wishlist/wishlist', 'wishlist_id');
00045     }

fetchItemsCount ( Mage_Wishlist_Model_Wishlist wishlist  ) 

Definition at line 58 of file Wishlist.php.

00059     {
00060         if (is_null($this->_itemsCount)) {
00061             $collection = $wishlist->getProductCollection()
00062                 //->addAttributeToFilter('store_id', array('in'=>$wishlist->getSharedStoreIds()))
00063                 ->addStoreFilter();
00064 
00065             Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
00066             Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($collection);
00067 
00068             $this->_itemsCount = $collection->getSize();
00069         }
00070 
00071         return $this->_itemsCount;
00072     }

getCustomerIdFieldName (  ) 

Definition at line 47 of file Wishlist.php.

00048     {
00049         return $this->_customerIdFieldName;
00050     }

setCustomerIdFieldName ( fieldName  ) 

Definition at line 52 of file Wishlist.php.

00053     {
00054         $this->_customerIdFieldName = $fieldName;
00055         return $this;
00056     }


Member Data Documentation

$_customerIdFieldName = 'customer_id' [protected]

Definition at line 40 of file Wishlist.php.

$_itemsCount = null [protected]

Definition at line 38 of file Wishlist.php.


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

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