Public Member Functions | |
loadByEntityStore (Mage_Core_Model_Abstract $object, $entityTypeId, $storeId) | |
Protected Member Functions | |
_construct () |
Definition at line 28 of file Store.php.
_construct | ( | ) | [protected] |
Resource initialization
Reimplemented from Mage_Core_Model_Resource_Abstract.
Definition at line 30 of file Store.php.
00031 { 00032 $this->_init('eav/entity_store', 'entity_store_id'); 00033 }
loadByEntityStore | ( | Mage_Core_Model_Abstract $ | object, | |
$ | entityTypeId, | |||
$ | storeId | |||
) |
Load an object by entity type and store
Varien_Object | $object | |
integer | $id | |
string | $field field to load by (defaults to model id) |
Definition at line 43 of file Store.php.
00044 { 00045 $read = $this->_getReadAdapter(); 00046 00047 $select = $read->select()->from($this->getMainTable()) 00048 ->where('entity_type_id=?', $entityTypeId) 00049 ->where('store_id=?', $storeId); 00050 $data = $read->fetchRow($select); 00051 00052 if (!$data) { 00053 return false; 00054 } 00055 00056 $object->setData($data); 00057 00058 $this->_afterLoad($object); 00059 00060 return true; 00061 }