Class Mage_Eav_Model_Entity_Abstract

Description

Implements interfaces:

Entity/Attribute/Model - entity abstract

Located in /Eav/Model/Entity/Abstract.php (line 35)

Mage_Core_Model_Resource_Abstract
   |
   --Mage_Eav_Model_Entity_Abstract
Direct descendents
Class Description
Mage_Catalog_Model_Resource_Eav_Mysql4_Abstract Catalog entity abstract model
Mage_Customer_Model_Entity_Address Customer address entity resource model
Mage_Customer_Model_Entity_Customer Customer entity resource model
Mage_Sales_Model_Entity_Quote_Item Quote entity resource model
Mage_Sales_Model_Entity_Quote_Payment Quote entity resource model
Mage_Sales_Model_Entity_Quote_Address_Item Quote entity resource model
Mage_Sales_Model_Entity_Quote_Address_Rate Quote entity resource model
Mage_Sales_Model_Entity_Quote_Address Quote entity resource model
Mage_Sales_Model_Entity_Quote Quote entity resource model
Mage_Sales_Model_Entity_Order_Invoice_Item Invoice item resource model
Mage_Sales_Model_Entity_Order_Invoice_Comment Invoice comment resource model
Mage_Sales_Model_Entity_Order_Item Order item entity resource model
Mage_Sales_Model_Entity_Order_Payment Order payment entity resource model
Mage_Sales_Model_Entity_Order_Creditmemo Creditmemo entity resource model
Mage_Sales_Model_Entity_Order_Creditmemo_Item Creditmemo item resource model
Mage_Sales_Model_Entity_Order_Creditmemo_Comment Creditmemo comment resource model
Mage_Sales_Model_Entity_Order_Status_History Order status history entity resource model
Mage_Sales_Model_Entity_Order_Shipment_Item Shipment item resource model
Mage_Sales_Model_Entity_Order_Shipment_Track Shipment track resource model
Mage_Sales_Model_Entity_Order_Shipment_Comment Shipment comment resource model
Mage_Sales_Model_Entity_Order_Address Order address entity resource model
Mage_Sales_Model_Entity_Order_Invoice Invoice entity resource model
Mage_Sales_Model_Entity_Order_Shipment Shipment entity resource model
Mage_Sales_Model_Entity_Order Order entity resource model
Mage_Eav_Model_Entity EAV entity model
Variable Summary
Method Summary
void attributesCompare ( $attribute1,  $attribute2)
boolean checkAttributeUniqueValue (Mage_Eav_Model_Entity_Attribute_Abstract $attribute, Varien_Object $object)
string getEntityIdField ()
string getEntityTable ()
string getIdFieldName ()
Varien_Db_Adapter_Pdo_Mysql getReadConnection ()
array getSortedAttributes ([int $setId = null])
string getTable (string $alias)
string getType ()
integer getTypeId ()
Varien_Db_Adapter_Pdo_Mysql getWriteConnection ()
unknown isAttributeStatic (integer|string|Mage_Eav_Model_Entity_Attribute_Abstract $attribute)
boolean isPartialLoad ([boolean $flag = null])
boolean isPartialSave ([boolean $flag = null])
Mage_Eav_Model_Entity_Abstract load (Varien_Object $object, integer $entityId, [array|null $attributes = array()])
Mage_Eav_Model_Entity_Abstract saveAttribute ( $object, string $attributeCode)
Mage_Eav_Model_Entity_Abstract setConnection (Zend_Db_Adapter_Abstract|string $read, [Zend_Db_Adapter_Abstract|string|null $write = null])
Mage_Eav_Model_Entity_Abstract unsetAttributes ([array|string|null $attributes = null])
bool|array validate (Varien_Object $object)
array walkAttributes ( $partMethod, [ $args = array()], string $method, array $part)
void _afterDelete ( $object)
void _afterLoad ( $object)
void _afterSave ( $object)
void _beforeDelete ( $object)
void _beforeSave ( $object)
bool _canUpdateAttribute (Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $value,  &$origData, array $origData)
array _collectSaveData (Varien_Object $newObject)
void _construct ()
Varien_Object _deleteAttributes (Varien_Object $object, string $table, array $info)
Zend_Db_Select _getLoadAttributesSelect (Varien_Object $object,  $table, mixed $rowId)
Zend_Db_Select _getLoadRowSelect (Varien_Object $object, mixed $rowId)
Varien_Object _getOrigObject (Varien_Object $object)
Varien_Db_Adapter_Pdo_Mysql _getReadAdapter ()
array _getStaticFieldProperties (string $field)
Varien_Db_Adapter_Pdo_Mysql _getWriteAdapter ()
boolean _isApplicableAttribute (Varien_Object $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute)
Zend_Db_Select _prepareLoadSelect ( $selects)
mixed _prepareStaticValue (string $key, mixed $value)
Mage_Eav_Model_Entity_Abstract _setAttribteValue (Varien_Object $object, array $valueRow)
Mage_Eav_Model_Entity_Abstract _updateAttribute (Varien_Object $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $valueId, mixed $value)
Variables
static array $_defaultAttributes = array() (line 93)

Default Attributes that are static

  • access: protected
unknown_type $_attributesByCode = array() (line 72)

Attributes array by attribute name

  • access: protected
array $_attributesById = array() (line 65)

Attributes array by attribute id

  • access: protected
array $_attributesByTable = array() (line 79)

2-dimentional array by table name and attribute name

  • access: protected
array $_attributeValuesToDelete = array() (line 156)

Entity attribute values per backend table to delete

  • access: protected
array $_attributeValuesToSave = array() (line 163)

Entity attribute values per backend table to save

  • access: protected
array $_describeTable = array() (line 107)

Describe data for tables

  • access: protected
string $_entityIdField (line 114)

Enter description here...

  • access: protected
string $_entityTable (line 100)

Enter description here...

  • access: protected
boolean $_isPartialLoad = false (line 135)

Enter description here...

  • access: protected
boolean $_isPartialSave = false (line 142)

Enter description here...

  • access: protected
Varien_Db_Adapter_Pdo_Mysql $_read (line 44)

Read connection

  • access: protected
int $_sortingSetId = null (line 149)

Attribute set id which used for get sorted attributes

  • access: protected
array $_staticAttributes = array() (line 86)

Attributes that are static fields in entity table

  • access: protected
Mage_Eav_Model_Entity_Type $_type (line 58)

Entity type configuration

  • access: protected
string $_valueEntityIdField (line 121)

Enter description here...

  • access: protected
string $_valueTablePrefix (line 128)

Enter description here...

  • access: protected
Varien_Db_Adapter_Pdo_Mysql $_write (line 51)

Write connection

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Resource_Abstract

Mage_Core_Model_Resource_Abstract::$_commitCallbacks
Methods
addAttribute (line 444)

Adding attribute to entity

  • access: public
attributesCompare (line 550)
  • access: public
void attributesCompare ( $attribute1,  $attribute2)
  • $attribute1
  • $attribute2
checkAttributeUniqueValue (line 830)

Enter description here...

  • access: public
boolean checkAttributeUniqueValue (Mage_Eav_Model_Entity_Attribute_Abstract $attribute, Varien_Object $object)
delete (line 1462)

Delete entity using current object's data

  • access: public
Mage_Eav_Model_Entity_Abstract delete ( $object)
  • $object
getAttribute (line 352)

Retrieve attribute instance by name, id or config node

This will add the attribute configuration to entity's attributes cache

If attribute is not found false is returned

  • return: || false
  • access: public
getAttributesByCode (line 672)

Get attributes by name array

  • access: public
array getAttributesByCode ()
getAttributesById (line 682)

Get attributes by id array

  • access: public
array getAttributesById ()
getAttributesByTable (line 692)

Get attributes by table and name array

  • access: public
array getAttributesByTable ()
getDefaultAttributes (line 1561)

Retrieve default entity static attributes

  • access: public
array getDefaultAttributes ()
getDefaultAttributeSourceModel (line 868)

Enter description here...

  • access: public
string getDefaultAttributeSourceModel ()

Redefined in descendants as:
getEntityIdField (line 719)

Get entity id field name in entity table

  • access: public
string getEntityIdField ()
getEntityTable (line 702)

Get entity table name

  • access: public
string getEntityTable ()
getEntityType (line 274)

Retrieve current entity config

  • access: public
Mage_Eav_Model_Entity_Type getEntityType ()
getIdFieldName (line 238)

For compatibility with Mage_Core_Model_Abstract

  • access: public
string getIdFieldName ()
getReadConnection (line 218)

Retrieve read DB connection

  • access: public
Varien_Db_Adapter_Pdo_Mysql getReadConnection ()
getSortedAttributes (line 527)

Retrieve sorted attributes

  • access: public
array getSortedAttributes ([int $setId = null])
  • int $setId
getTable (line 249)

Enter description here...

  • access: public
string getTable (string $alias)
  • string $alias
getType (line 287)

Get entity type name

  • access: public
string getType ()
getTypeId (line 297)

Get entity type id

  • access: public
integer getTypeId ()
getValueEntityIdField (line 735)

Get default entity id field name in attribute values tables

  • access: public
string getValueEntityIdField ()
getValueTablePrefix (line 745)

Get prefix for value tables

  • access: public
string getValueTablePrefix ()
getWriteConnection (line 228)

Retrieve write DB connection

  • access: public
Varien_Db_Adapter_Pdo_Mysql getWriteConnection ()
isAttributeStatic (line 769)

Check whether the attribute is a real field in entity table

  • see: Mage_Eav_Model_Entity_Abstract::getAttribute for $attribute format
  • access: public
unknown isAttributeStatic (integer|string|Mage_Eav_Model_Entity_Attribute_Abstract $attribute)
isPartialLoad (line 466)

Enter description here...

  • access: public
boolean isPartialLoad ([boolean $flag = null])
  • boolean $flag
isPartialSave (line 481)

Enter description here...

  • access: public
boolean isPartialSave ([boolean $flag = null])
  • boolean $flag
load (line 881)

Load entity's attributes into the object

  • access: public
Mage_Eav_Model_Entity_Abstract load (Varien_Object $object, integer $entityId, [array|null $attributes = array()])
  • Varien_Object $object
  • integer $entityId
  • array|null $attributes

Redefined in descendants as:
loadAllAttributes (line 495)

Retrieve configuration for all attributes

  • access: public
Mage_Eav_Model_Entity_Attribute_Abstract loadAllAttributes ([ $object = null])
  • $object
save (line 995)

Save entity's attributes into the object's resource

  • access: public
  • Varien_Object $object
saveAttribute (line 1407)

Save attribute

  • access: public
Mage_Eav_Model_Entity_Abstract saveAttribute ( $object, string $attributeCode)
  • Varien_Object $object
  • string $attributeCode
setConnection (line 172)

Set connections for entity operations

  • access: public
Mage_Eav_Model_Entity_Abstract setConnection (Zend_Db_Adapter_Abstract|string $read, [Zend_Db_Adapter_Abstract|string|null $write = null])
  • Zend_Db_Adapter_Abstract|string $read
  • Zend_Db_Adapter_Abstract|string|null $write
setNewIncrementId (line 808)

Enter description here...

  • access: public
Mage_Eav_Model_Entity_Abstract setNewIncrementId ( $object)
  • Varien_Object $object

Redefined in descendants as:
setType (line 262)

Set configuration for the entity

Accepts config node or name of entity type

  • access: public
unsetAttributes (line 311)

Unset attributes

If NULL or not supplied removes configuration of all attributes If string - removes only one, if array - all specified

  • access: public
Mage_Eav_Model_Entity_Abstract unsetAttributes ([array|string|null $attributes = null])
  • array|string|null $attributes
validate (line 782)

Validate all object's attributes against configuration

  • throws: Mage_Eav_Model_Entity_Attribute_Exception
  • access: public
bool|array validate (Varien_Object $object)
  • Varien_Object $object

Redefined in descendants as:
walkAttributes (line 592)

Walk through the attributes and run method with optional arguments

Returns array with results for each attribute

if $method is in format "part/method" will run method on specified part for example: $this->walkAttributes('backend/validate');

  • access: public
array walkAttributes ( $partMethod, [ $args = array()], string $method, array $part)
  • string $method
  • array $args
  • array $part: attribute, backend, frontend, source
  • $partMethod
_afterDelete (line 1531)

After delete entity process

  • access: protected
void _afterDelete ( $object)
  • Varien_Object $object
_afterLoad (line 1491)

After Load Entity process

  • access: protected
void _afterLoad ( $object)
  • Varien_Object $object
_afterSave (line 1511)

After Save Entity process

  • access: protected
void _afterSave ( $object)
  • Varien_Object $object

Redefined in descendants as:
_afterSetConfig (line 1571)

After set config process

  • deprecated:
  • access: protected
Mage_Eav_Model_Entity_Abstract _afterSetConfig ()
_beforeDelete (line 1521)

Before Delete Entity process

  • access: protected
void _beforeDelete ( $object)
  • Varien_Object $object

Redefined in descendants as:
_beforeSave (line 1501)

Before delete Entity process

  • access: protected
void _beforeSave ( $object)
  • Varien_Object $object

Redefined in descendants as:
_canUpdateAttribute (line 1142)

Return if attribute exists in original data array.

  • access: protected
bool _canUpdateAttribute (Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $value,  &$origData, array $origData)

Redefined in descendants as:
_collectSaveData (line 1044)

Prepare entity object data for save

result array structure: array ( 'newObject', 'entityRow', 'insert', 'update', 'delete' )

  • access: protected
array _collectSaveData (Varien_Object $newObject)
  • Varien_Object $newObject
_construct (line 182)

Resource initialization

  • access: protected
void _construct ()

Redefinition of:
Mage_Core_Model_Resource_Abstract::_construct()
Resource initialization

Redefined in descendants as:
_deleteAttributes (line 1374)

Delete entity attribute values

  • access: protected
Varien_Object _deleteAttributes (Varien_Object $object, string $table, array $info)
  • Varien_Object $object
  • string $table
  • array $info

Redefined in descendants as:
_getDefaultAttribute (line 422)

Return default static virtual attribute that doesn't exists in EAV attributes

  • access: protected
Mage_Eav_Model_Entity_Attribute _getDefaultAttribute (string $attributeCode)
  • string $attributeCode
_getDefaultAttributeModel (line 1541)

Retrieve Default attribute model

  • access: protected
string _getDefaultAttributeModel ()

Redefined in descendants as:
_getDefaultAttributes (line 1551)

Retrieve default entity attributes

  • access: protected
array _getDefaultAttributes ()

Redefined in descendants as:
_getLoadAttributesSelect (line 964)

Retrieve select object for loading entity attributes values

  • access: protected
Zend_Db_Select _getLoadAttributesSelect (Varien_Object $object,  $table, mixed $rowId)
  • Varien_Object $object
  • mixed $rowId
  • $table

Redefined in descendants as:
_getLoadRowSelect (line 948)

Retrieve select object for loading base entity row

  • access: protected
Zend_Db_Select _getLoadRowSelect (Varien_Object $object, mixed $rowId)
  • Varien_Object $object
  • mixed $rowId

Redefined in descendants as:
_getOrigObject (line 1024)

Retrieve Object instance with original data

  • access: protected
Varien_Object _getOrigObject (Varien_Object $object)
  • Varien_Object $object

Redefined in descendants as:
_getReadAdapter (line 192)

Retrieve connection for read data

  • access: protected
Varien_Db_Adapter_Pdo_Mysql _getReadAdapter ()

Redefinition of:
Mage_Core_Model_Resource_Abstract::_getReadAdapter()
Retrieve connection for read data
_getStaticFieldProperties (line 1153)

Retrieve static field properties

  • access: protected
array _getStaticFieldProperties (string $field)
  • string $field
_getWriteAdapter (line 205)

Retrieve connection for write data

  • access: protected
Varien_Db_Adapter_Pdo_Mysql _getWriteAdapter ()

Redefinition of:
Mage_Core_Model_Resource_Abstract::_getWriteAdapter()
Retrieve connection for write data
_insertAttribute (line 1264)

Insert entity attribute value

  • access: protected
Mage_Eav_Model_Entity_Abstract _insertAttribute (Varien_Object $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $value)

Redefined in descendants as:
_isApplicableAttribute (line 574)

Check whether the attribute is Applicable to the object

  • access: protected
boolean _isApplicableAttribute (Varien_Object $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute)

Redefined in descendants as:
_isAttributeValueEmpty (line 1601)

Check is attribute value empty

  • access: protected
bool _isAttributeValueEmpty (Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $value)

Redefined in descendants as:
_isCallableAttributeInstance (line 658)

Check whether attribute instance (attribute, backend, frontend or source) has method and applicable

  • access: protected

Redefined in descendants as:
_prepareLoadSelect (line 935)

Prepare select object for loading entity attributes values

  • access: protected
Zend_Db_Select _prepareLoadSelect ( $selects)
  • array $selects

Redefined in descendants as:
_prepareStaticValue (line 1173)

Prepare static value for save

  • access: protected
mixed _prepareStaticValue (string $key, mixed $value)
  • string $key
  • mixed $value
_prepareValueForSave (line 1358)

Prepare value for save

  • access: protected
mixed _prepareValueForSave (mixed $value, Mage_Eav_Model_Entity_Attribute_Abstract $attribute)

Redefined in descendants as:
_processAttributeValues (line 1333)

Save and detele collected attribute values

  • access: protected
Mage_Eav_Model_Entity_Abstract _processAttributeValues ()
_processSaveData (line 1194)

Save object collected data

  • access: protected
Mage_Eav_Model_Entity_Abstract _processSaveData (array $saveData)
  • array $saveData: array('newObject', 'entityRow', 'insert', 'update', 'delete')
_saveAttribute (line 1307)

Save entity attribute value

Collect for mass save

  • access: protected
_setAttribteValue (line 979)

Initialize attribute value for object

  • access: protected
Mage_Eav_Model_Entity_Abstract _setAttribteValue (Varien_Object $object, array $valueRow)
  • Varien_Object $object
  • array $valueRow

Redefined in descendants as:
_updateAttribute (line 1287)

Update entity attribute value

  • access: protected
Mage_Eav_Model_Entity_Abstract _updateAttribute (Varien_Object $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute, mixed $valueId, mixed $value)

Redefined in descendants as:

Inherited Methods

Inherited From Mage_Core_Model_Resource_Abstract

Mage_Core_Model_Resource_Abstract::__construct()
Mage_Core_Model_Resource_Abstract::addCommitCallback()
Mage_Core_Model_Resource_Abstract::beginTransaction()
Mage_Core_Model_Resource_Abstract::commit()
Mage_Core_Model_Resource_Abstract::formatDate()
Mage_Core_Model_Resource_Abstract::mktime()
Mage_Core_Model_Resource_Abstract::rollBack()
Mage_Core_Model_Resource_Abstract::_construct()
Mage_Core_Model_Resource_Abstract::_getReadAdapter()
Mage_Core_Model_Resource_Abstract::_getWriteAdapter()
Mage_Core_Model_Resource_Abstract::_serializeField()
Mage_Core_Model_Resource_Abstract::_unserializeField()

Documentation generated on Fri, 11 Feb 2011 16:54:51 +0200 by phpDocumentor 1.4.3