Class Mage_Catalog_Model_Abstract

Description

Abstract model for catalog entities

Located in /Catalog/Model/Abstract.php (line 34)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Catalog_Model_Abstract
Direct descendents
Class Description
Mage_Catalog_Model_Category Catalog category
Mage_Catalog_Model_Product Catalog product model
Class Constant Summary
Variable Summary
Method Summary
mixed getAttributeDefaultValue (string $attributeCode)
bool getExistsStoreValueFlag (string $attributeCode)
unknown getWebsiteStoreIds ()
boolean hasLockedAttributes ()
boolean isDeleteable ()
array isLockedAttribute ( $attributeCode)
boolean isReadonly ()
void loadByAttribute ( $attribute,  $value, [ $additionalAttributes = '*'])
Mage_Catalog_Model_Abstract lockAttribute (string $attributeCode)
Mage_Catalog_Model_Abstract setAttributeDefaultValue (string $attributeCode,  $value)
Varien_Object setData (string|array $key, [mixed $value = null], boolean $isChanged)
Mage_Catalog_Model_Abstract unlockAttribute (string $attributeCode)
Varien_Object unsetData ([string $key = null], boolean $isChanged)
Variables
array $_defaultValues = array() (line 50)

Attribute default values

This array contain default values for attributes which was redefine value for store

  • access: protected
boolean $_isDeleteable = true (line 71)

Is model deleteable

  • access: protected
boolean $_isReadonly = false (line 78)

Is model readonly

  • access: protected
array $_lockedAttributes = array() (line 64)

Locked attributes

  • access: protected
array $_storeValuesFlags = array() (line 57)

This array contains codes of attributes which have value in current store

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_eventObject
Mage_Core_Model_Abstract::$_eventPrefix
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
getAttributeDefaultValue (line 269)

Retrieve default value for attribute code

  • access: public
mixed getAttributeDefaultValue (string $attributeCode)
  • string $attributeCode
getExistsStoreValueFlag (line 293)

Check if object attribute has value in current store

  • access: public
bool getExistsStoreValueFlag (string $attributeCode)
  • string $attributeCode
getLockedAttributes (line 124)

Retrieve locked attributes

  • access: public
array getLockedAttributes ()
getResourceCollection (line 209)

Get collection instance

  • access: public
object getResourceCollection ()

Redefinition of:
Mage_Core_Model_Abstract::getResourceCollection()
Get collection instance

Redefined in descendants as:
getStore (line 234)

Retrieve sore object

  • access: public
Mage_Core_Model_Store getStore ()
getWebsiteStoreIds (line 244)

Retrieve all store ids of object current website

  • access: public
unknown getWebsiteStoreIds ()
hasLockedAttributes (line 134)

Checks that model have locked attribtues

  • access: public
boolean hasLockedAttributes ()
isDeleteable (line 314)

Checks model is deleteable

  • access: public
boolean isDeleteable ()
isLockedAttribute (line 144)

Retrieve locked attributes

  • access: public
array isLockedAttribute ( $attributeCode)
  • $attributeCode
isReadonly (line 336)

Checks model is deleteable

  • access: public
boolean isReadonly ()
loadByAttribute (line 216)
  • access: public
void loadByAttribute ( $attribute,  $value, [ $additionalAttributes = '*'])
  • $attribute
  • $value
  • $additionalAttributes
lockAttribute (line 87)

Lock attribute

  • access: public
Mage_Catalog_Model_Abstract lockAttribute (string $attributeCode)
  • string $attributeCode
setAttributeDefaultValue (line 257)

Adding attribute code and value to default value registry

Default value existing is flag for using store value in data

  • access: public
Mage_Catalog_Model_Abstract setAttributeDefaultValue (string $attributeCode,  $value)
  • string $attributeCode
  • $value
setData (line 164)

Overwrite data in the object.

$key can be string or array. If $key is string, the attribute value will be overwritten by $value

If $key is an array, it will overwrite all the data in the object.

$isChanged will specify if the object needs to be saved after an update.

  • access: public
Varien_Object setData (string|array $key, [mixed $value = null], boolean $isChanged)
  • string|array $key
  • mixed $value
  • boolean $isChanged
setExistsStoreValueFlag (line 281)

Set attribute code flag if attribute has value in current store and does not use value of default store as value

  • access: public
Mage_Catalog_Model_Abstract setExistsStoreValueFlag (string $attributeCode)
  • string $attributeCode
setIsDeleteable (line 325)

Set is deleteable flag

  • access: public
Mage_Catalog_Model_Abstract setIsDeleteable (boolean $value)
  • boolean $value
setIsReadonly (line 347)

Set is deleteable flag

  • access: public
Mage_Catalog_Model_Abstract setIsReadonly (boolean $value)
  • boolean $value
unlockAttribute (line 99)

Unlock attribute

  • access: public
Mage_Catalog_Model_Abstract unlockAttribute (string $attributeCode)
  • string $attributeCode
unlockAttributes (line 113)

Unlock all attributes

  • access: public
Mage_Catalog_Model_Abstract unlockAttributes ()
unsetData (line 194)

Unset data from the object.

$key can be a string only. Array will be ignored.

$isChanged will specify if the object needs to be saved after an update.

  • access: public
Varien_Object unsetData ([string $key = null], boolean $isChanged)
  • string $key
  • boolean $isChanged
_beforeSave (line 303)

Before save unlock attributes

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data

Redefined in descendants as:

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()
Class Constants
DEFAULT_STORE_ID = 0 (line 40)

Identifuer of default store

used for loading default data for entity

Documentation generated on Fri, 11 Feb 2011 16:55:02 +0200 by phpDocumentor 1.4.3