Public Member Functions | |
addWebsiteFilter ($websiteIds) | |
Protected Member Functions | |
_construct () | |
_afterLoad () |
Definition at line 28 of file Collection.php.
_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
int|array | $websiteIds |
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 }