Mage_Customer_Model_Entity_Group_Collection Class Reference

Inheritance diagram for Mage_Customer_Model_Entity_Group_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 setTaxGroupFilter ($classId)
 setIgnoreIdFilter ($indexes)
 setRealGroupsFilter ()
 addTaxClass ()
 toOptionArray ()
 toOptionHash ()

Protected Member Functions

 _construct ()


Detailed Description

Customer group collection

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 32 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialization here

Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.

Definition at line 34 of file Collection.php.

00035     {
00036         $this->_init('customer/group');
00037     }

addTaxClass (  ) 

Definition at line 62 of file Collection.php.

00063     {
00064         $taxClassTable = Mage::getSingleton('core/resource')->getTableName('tax/tax_class');
00065         $this->_select->joinLeft($taxClassTable, "main_table.tax_class_id = {$taxClassTable}.class_id");
00066 
00067         return $this;
00068     }

setIgnoreIdFilter ( indexes  ) 

Definition at line 47 of file Collection.php.

00048     {
00049         if( !count($indexes) > 0 ) {
00050             return $this;
00051         }
00052         $this->_select->where('main_table.customer_group_id NOT IN(?)', $indexes);
00053         return $this;
00054     }

setRealGroupsFilter (  ) 

Definition at line 56 of file Collection.php.

00057     {
00058         $this->addFieldToFilter('customer_group_id', array('gt'=>0));
00059         return $this;
00060     }

setTaxGroupFilter ( classId  ) 

Definition at line 39 of file Collection.php.

00040     {
00041         $taxClassGroupTable = Mage::getSingleton('core/resource')->getTableName('tax/tax_class_group');
00042         $this->_select->joinLeft($taxClassGroupTable, "{$taxClassGroupTable}.class_group_id=main_table.customer_group_id");
00043         $this->_select->where("{$taxClassGroupTable}.class_parent_id = ?", $classId);
00044         return $this;
00045     }

toOptionArray (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 70 of file Collection.php.

00071     {
00072         return parent::_toOptionArray('customer_group_id', 'customer_group_code');
00073     }

toOptionHash (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 74 of file Collection.php.

00075     {
00076         return parent::_toOptionHash('customer_group_id', 'customer_group_code');
00077     }


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

Generated on Sat Jul 4 17:24:04 2009 for Magento by  doxygen 1.5.8