Public Member Functions | |
getRetreiver ($type) | |
getCustomerGroups () | |
assignProductTypes ($products) | |
Public Attributes | |
const | CHILDREN_FOR_TIERS = 1 |
const | CHILDREN_FOR_PRICES = 2 |
const | CHILDREN_FOR_ATTRIBUTES = 3 |
Protected Member Functions | |
_construct () | |
Protected Attributes | |
$_attributeIdCache = array() | |
$_customerGroups | |
$_retreivers = array() |
Definition at line 32 of file Retreiver.php.
_construct | ( | ) | [protected] |
Retreiver factory init, load retreiver settings
Reimplemented from Varien_Object.
Definition at line 58 of file Retreiver.php.
00059 { 00060 $config = Mage::getConfig()->getNode('global/catalog/product/type')->asArray(); 00061 foreach ($config as $type=>$data) { 00062 if (isset($data['index_data_retreiver'])) { 00063 $this->_retreivers[$type] = $data['index_data_retreiver']; 00064 } 00065 } 00066 00067 $this->_init('catalogindex/retreiver'); 00068 }
assignProductTypes | ( | $ | products | ) |
Return product ids sorted by type
array | $products |
Definition at line 104 of file Retreiver.php.
00105 { 00106 $flat = $this->_getResource()->getProductTypes($products); 00107 $result = array(); 00108 foreach ($flat as $one) { 00109 $result[$one['type']][] = $one['id']; 00110 } 00111 return $result; 00112 }
getCustomerGroups | ( | ) |
Return customer group collection
Definition at line 90 of file Retreiver.php.
00091 { 00092 if (is_null($this->_customerGroups)) { 00093 $this->_customerGroups = Mage::getModel('customer/group')->getCollection(); 00094 } 00095 return $this->_customerGroups; 00096 }
getRetreiver | ( | $ | type | ) |
Returns data retreiver model by specified product type
string | $type |
Definition at line 76 of file Retreiver.php.
00077 { 00078 if (isset($this->_retreivers[$type])) { 00079 return Mage::getSingleton($this->_retreivers[$type]); 00080 } else { 00081 Mage::throwException("Data retreiver for '{$type}' is not defined"); 00082 } 00083 }
$_attributeIdCache = array() [protected] |
Definition at line 38 of file Retreiver.php.
$_customerGroups [protected] |
Definition at line 45 of file Retreiver.php.
$_retreivers = array() [protected] |
Definition at line 52 of file Retreiver.php.
const CHILDREN_FOR_ATTRIBUTES = 3 |
Definition at line 36 of file Retreiver.php.
const CHILDREN_FOR_PRICES = 2 |
Definition at line 35 of file Retreiver.php.
const CHILDREN_FOR_TIERS = 1 |
Definition at line 34 of file Retreiver.php.