Mage_Bundle_Model_Mysql4_Selection_Collection Class Reference

Inheritance diagram for Mage_Bundle_Model_Mysql4_Selection_Collection:

Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract Mage_Eav_Model_Entity_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 setOptionIdsFilter ($optionIds)
 setSelectionIdsFilter ($selectionIds)
 setPositionOrder ()

Protected Member Functions

 _construct ()
 _initSelect ()

Protected Attributes

 $_selectionTable


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialize resources

Reimplemented from Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection.

Definition at line 39 of file Collection.php.

00040     {
00041         parent::_construct();
00042         $this->setRowIdFieldName('selection_id');
00043         $this->_selectionTable = $this->getTable('bundle/selection');
00044     }

_initSelect (  )  [protected]

Initialize collection select Redeclared for remove entity_type_id condition in catalog_product_entity we store just products

Returns:
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection

Reimplemented from Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection.

Definition at line 46 of file Collection.php.

00047     {
00048         parent::_initSelect();
00049         $this->getSelect()->join(array('selection' => $this->_selectionTable),
00050             '`selection`.`product_id`=`e`.`entity_id`',
00051             array('*')
00052         );
00053     }

setOptionIdsFilter ( optionIds  ) 

Definition at line 55 of file Collection.php.

00056     {
00057         if (!empty($optionIds)) {
00058             $this->getSelect()->where('`selection`.`option_id` in (' . join(',', (array)$optionIds) . ')');
00059         }
00060         return $this;
00061     }

setPositionOrder (  ) 

Definition at line 71 of file Collection.php.

00072     {
00073         $this->getSelect()->order('selection.position asc')
00074             ->order('selection.selection_id asc');
00075         return $this;
00076     }

setSelectionIdsFilter ( selectionIds  ) 

Definition at line 63 of file Collection.php.

00064     {
00065         if (!empty($selectionIds)) {
00066             $this->getSelect()->where('`selection`.`selection_id` in (' . join(',', (array)$selectionIds) . ')');
00067         }
00068         return $this;
00069     }


Member Data Documentation

$_selectionTable [protected]

Definition at line 38 of file Collection.php.


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

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