Mage_Checkout_Model_Mysql4_Agreement_Collection Class Reference

Inheritance diagram for Mage_Checkout_Model_Mysql4_Agreement_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 addStoreFilter ($store)
 setIsStoreFilterWithAdmin ($value)

Protected Member Functions

 _construct ()

Protected Attributes

 $_isStoreFilterWithAdmin = true


Detailed Description

Definition at line 27 of file Collection.php.


Member Function Documentation

_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

Parameters:
int|Mage_Core_Model_Store $store
Returns:
Mage_Checkout_Model_Mysql4_Agreement_Collection

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

Parameters:
bool $value
Returns:
Mage_Checkout_Model_Mysql4_Agreement_Collection

Definition at line 73 of file Collection.php.

00074     {
00075         $this->_isStoreFilterWithAdmin = (bool)$value;
00076         return $this;
00077     }


Member Data Documentation

$_isStoreFilterWithAdmin = true [protected]

Definition at line 32 of file Collection.php.


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

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