Mage_Eav_Model_Mysql4_Entity_Store Class Reference

Inheritance diagram for Mage_Eav_Model_Mysql4_Entity_Store:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 loadByEntityStore (Mage_Core_Model_Abstract $object, $entityTypeId, $storeId)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 28 of file Store.php.


Member Function Documentation

_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

Parameters:
Varien_Object $object
integer $id
string $field field to load by (defaults to model id)
Returns:
boolean

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     }


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

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