Public Member Functions | |
addAttributeSetFilter ($attributeSetId, $targetCountry) | |
addTypeFilter ($type_id) | |
load ($printQuery=false, $logQuery=false) | |
getJoinAttributeSetFlag () | |
setJoinAttributeSetFlag ($flag) | |
Protected Member Functions | |
_construct () | |
_joinAttributeSet () | |
Protected Attributes | |
$_joinAttributeSetFlag = true |
Definition at line 34 of file Collection.php.
_construct | ( | ) | [protected] |
Initialization here
Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.
Definition at line 42 of file Collection.php.
00043 { 00044 $this->_init('googlebase/attribute'); 00045 }
_joinAttributeSet | ( | ) | [protected] |
Definition at line 75 of file Collection.php.
00076 { 00077 $this->getSelect() 00078 ->joinInner( 00079 array('types'=>$this->getTable('googlebase/types')), 00080 'main_table.type_id=types.type_id', 00081 array('attribute_set_id' => 'types.attribute_set_id', 'target_country' => 'types.target_country')); 00082 return $this; 00083 }
addAttributeSetFilter | ( | $ | attributeSetId, | |
$ | targetCountry | |||
) |
Definition at line 47 of file Collection.php.
00048 { 00049 if (!$this->getJoinAttributeSetFlag()) { 00050 return $this; 00051 } 00052 $this->getSelect()->where('attribute_set_id = ?', $attributeSetId); 00053 $this->getSelect()->where('target_country = ?', $targetCountry); 00054 return $this; 00055 }
addTypeFilter | ( | $ | type_id | ) |
Definition at line 57 of file Collection.php.
00058 { 00059 $this->getSelect()->where('main_table.type_id = ?', $type_id); 00060 return $this; 00061 }
getJoinAttributeSetFlag | ( | ) |
load | ( | $ | printQuery = false , |
|
$ | logQuery = false | |||
) |
Load data
Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.
Definition at line 63 of file Collection.php.
00064 { 00065 if ($this->isLoaded()) { 00066 return $this; 00067 } 00068 if ($this->getJoinAttributeSetFlag()) { 00069 $this->_joinAttributeSet(); 00070 } 00071 parent::load($printQuery, $logQuery); 00072 return $this; 00073 }
setJoinAttributeSetFlag | ( | $ | flag | ) |
$_joinAttributeSetFlag = true [protected] |
Whether to join attribute_set_id to attributes or not
Definition at line 39 of file Collection.php.