Mage_CatalogRule_Model_Mysql4_Rule_Collection Class Reference

Inheritance diagram for Mage_CatalogRule_Model_Mysql4_Rule_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 addWebsiteFilter ($websiteIds)

Protected Member Functions

 _construct ()
 _afterLoad ()


Detailed Description

Definition at line 28 of file Collection.php.


Member Function Documentation

_afterLoad (  )  [protected]

Reimplemented from Varien_Data_Collection_Db.

Definition at line 35 of file Collection.php.

00036     {
00037         $this->walk('afterLoad');
00038     }

_construct (  )  [protected]

Initialization here

Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.

Definition at line 30 of file Collection.php.

00031     {
00032         $this->_init('catalogrule/rule');
00033     }

addWebsiteFilter ( websiteIds  ) 

Filter collection by specified website IDs

Parameters:
int|array $websiteIds
Returns:
Mage_CatalogRule_Model_Mysql4_Rule_Collection

Definition at line 46 of file Collection.php.

00047     {
00048         if (!is_array($websiteIds)) {
00049             $websiteIds = array($websiteIds);
00050         }
00051         $parts = array();
00052         foreach ($websiteIds as $websiteId) {
00053             $parts[] = $this->getConnection()->quoteInto('FIND_IN_SET(?, main_table.website_ids)', $websiteId);
00054         }
00055         if ($parts) {
00056             $this->getSelect()->where(new Zend_Db_Expr(implode(' OR ', $parts)));
00057         }
00058         return $this;
00059     }


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

Generated on Sat Jul 4 17:23:48 2009 for Magento by  doxygen 1.5.8