Public Member Functions | |
setCustomerFilter ($customer) | |
Protected Member Functions | |
_construct () |
Definition at line 34 of file Collection.php.
_construct | ( | ) | [protected] |
Initialize collection
Reimplemented from Mage_Eav_Model_Entity_Collection_Abstract.
Definition at line 36 of file Collection.php.
00037 { 00038 $this->_init('customer/address'); 00039 }
setCustomerFilter | ( | $ | customer | ) |
Definition at line 41 of file Collection.php.
00042 { 00043 if ($customer->getId()) { 00044 $this->addAttributeToFilter('parent_id', $customer->getId()); 00045 } 00046 else { 00047 $this->addAttributeToFilter('parent_id', '-1'); 00048 } 00049 return $this; 00050 }