Public Member Functions | |
addStoreFilter ($store) | |
setIsStoreFilterWithAdmin ($value) | |
Protected Member Functions | |
_construct () | |
Protected Attributes | |
$_isStoreFilterWithAdmin = true |
Definition at line 27 of file Collection.php.
_construct | ( | ) | [protected] |
Initialize resource
Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.
Definition at line 38 of file Collection.php.
00039 { 00040 $this->_init('checkout/agreement'); 00041 }
addStoreFilter | ( | $ | store | ) |
Filter collection by specified store ids
int|Mage_Core_Model_Store | $store |
Definition at line 49 of file Collection.php.
00050 { 00051 if ($store instanceof Mage_Core_Model_Store) { 00052 $store = array($store->getId()); 00053 } 00054 00055 $read = $this->getConnection(); 00056 $this->getSelect()->join( 00057 array('store_table' => $this->getTable('checkout/agreement_store')), 00058 'main_table.agreement_id = store_table.agreement_id', 00059 array() 00060 ) 00061 ->where('store_table.store_id in (?)', ($this->_isStoreFilterWithAdmin ? array(0, $store) : $store)) 00062 ->group('main_table.agreement_id'); 00063 00064 return $this; 00065 }
setIsStoreFilterWithAdmin | ( | $ | value | ) |
Make store filter using admin website or not
bool | $value |
Definition at line 73 of file Collection.php.
$_isStoreFilterWithAdmin = true [protected] |
Definition at line 32 of file Collection.php.