Class Mage_Catalog_Model_Category

Description

Catalog category

Located in /Catalog/Model/Category.php (line 35)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Catalog_Model_Abstract
         |
         --Mage_Catalog_Model_Category
Class Constant Summary
CACHE_TAG = 'catalog_category'
DM_MIXED = 'PRODUCTS_AND_PAGE'
DM_PAGE = 'PAGE'
DM_PRODUCT = 'PRODUCTS'
ENTITY = 'catalog_category'
Variable Summary
Method Summary
bool checkId (int $id)
string formatUrlKey (string $str)
array|string getAllChildren ([boolean $asArray = false])
array getAnchorsAbove ()
array getAttributes ([ $noDesignAttributes = false])
null|array getAvailableSortBy ()
mixed getCategories (int $parent, [int $recursionLevel = 0], [bool $sorted = false], [bool $asCollection = false], [bool $toLoad = true])
string getCategoryIdUrl ()
string getChildren ()
string getDefaultSortBy ()
string getImageUrl ()
int getLevel ()
string getName ()
int getParentId ()
array getParentIds ()
array getPathIds ()
string getPathInStore ()
Varien_Data_Collection_Db getProductCollection ()
string getRequestPath ()
integer getStoreId ()
array getStoreIds ()
string getUrl ()
string getUrlPath ()
bool hasChildren ()
Mage_Catalog_Model_Category move (int $parentId, int $afterCategoryId)
bool|array validate ()
bool verifyIds ( $ids)
void _construct ()
Variables
static Mage_Core_Model_Url $_url (line 76)

URL Model instance

  • access: protected
static Mage_Core_Model_Url_Rewrite $_urlRewrite (line 83)

URL rewrite model

  • access: protected
mixed $_cacheTag = self::CACHE_TAG (line 69)

Model cache tag for clear cache in after save and after delete

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_cacheTag
Model cache tag for clear cache in after save and after delete
string $_eventObject = 'category' (line 64)

Parameter name in event

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventObject
Parameter name in event
string $_eventPrefix = 'catalog_category' (line 57)

Prefix of model events names

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::$_eventPrefix
Prefix of model events names

Category tree model

  • access: protected
bool $_useFlatResource = false (line 90)

Use flat resource model flag

  • access: protected

Inherited Variables

Inherited from Mage_Catalog_Model_Abstract

Mage_Catalog_Model_Abstract::$_defaultValues
Mage_Catalog_Model_Abstract::$_isDeleteable
Mage_Catalog_Model_Abstract::$_isReadonly
Mage_Catalog_Model_Abstract::$_lockedAttributes
Mage_Catalog_Model_Abstract::$_storeValuesFlags

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
afterCommitCallback (line 931)

Init indexing process after category data commit

  • access: public
Mage_Catalog_Model_Category afterCommitCallback ()

Redefinition of:
Mage_Core_Model_Abstract::afterCommitCallback()
Callback function which called after transaction commit in resource model
checkId (line 664)

Check category id exising

  • access: public
bool checkId (int $id)
  • int $id
formatUrlKey (line 467)

Format URL key from name or defined key

  • access: public
string formatUrlKey (string $str)
  • string $str
getAllChildren (line 600)

Get all children categories IDs

  • access: public
array|string getAllChildren ([boolean $asArray = false])
  • boolean $asArray: return result as array instead of comma-separated list of IDs
getAnchorsAbove (line 758)

Retrieve anchors above

  • access: public
array getAnchorsAbove ()
getAttributes (line 276)

Retrieve all customer attributes

  • todo: Use with Flat Resource
  • access: public
array getAttributes ([ $noDesignAttributes = false])
  • $noDesignAttributes
getAvailableSortBy (line 859)

Retrieve Available int Product Listing sort by

  • access: public
null|array getAvailableSortBy ()
getAvailableSortByOptions (line 877)

Retrieve Available Product Listing Sort By code as key, value - name

  • access: public
array getAvailableSortByOptions ()
getCategories (line 807)

Retrieve categories by parent

  • access: public
mixed getCategories (int $parent, [int $recursionLevel = 0], [bool $sorted = false], [bool $asCollection = false], [bool $toLoad = true])
  • int $parent
  • int $recursionLevel
  • bool $sorted
  • bool $asCollection
  • bool $toLoad
getCategoryIdUrl (line 449)

Retrieve category id URL

  • access: public
string getCategoryIdUrl ()
getChildren (line 633)

Retrieve children ids comma separated

  • access: public
string getChildren ()
getChildrenCategories (line 829)

Retuen children categories of current category

  • access: public
array getChildrenCategories ()
getCustomDesignDate (line 553)

Retrieve dates for custom design (from & to)

  • access: public
array getCustomDesignDate ()
getDefaultAttributeSetId (line 252)

Retrieve default attribute set id

  • access: public
int getDefaultAttributeSetId ()
getDefaultSortBy (line 901)

Retrieve Product Listing Default Sort By

  • access: public
string getDefaultSortBy ()
getDesignAttributes (line 567)

Retrieve design attributes array

  • access: public
array getDesignAttributes ()
getImageUrl (line 481)

Retrieve image URL

  • access: public
string getImageUrl ()
getLayoutUpdateHandle (line 361)

Retrieve Layout Update Handle name

  • access: public
string getLayoutUpdateHandle ()
getLevel (line 690)

Retrieve level

  • access: public
int getLevel ()
getName (line 734)

Retrieve Name data wraper

  • access: public
string getName ()
getParentCategories (line 819)

Return parent categories of current category

  • access: public
array getParentCategories ()
getParentCategory (line 519)

Get parent category object

  • access: public
Mage_Catalog_Model_Category getParentCategory ()
getParentDesignCategory (line 839)

Return parent category of current category with own custom design settings

  • access: public
Mage_Catalog_Model_Category getParentDesignCategory ()
getParentId (line 532)

Get parent category identifier

  • access: public
int getParentId ()
getParentIds (line 543)

Get all parent categories ids

  • access: public
array getParentIds ()
getPathIds (line 675)

Get array categories ids which are part of category path Result array contain id of current category because it is part of the path

  • access: public
array getPathIds ()
getPathInStore (line 644)

Retrieve Stores where isset category Path Return comma separated string

  • access: public
string getPathInStore ()
getProductCollection (line 262)

Get category products collection

  • access: public
Varien_Data_Collection_Db getProductCollection ()
getProductCount (line 788)

Retrieve count products of category

  • access: public
int getProductCount ()
getProductsPosition (line 300)

Retrieve array of product id's for category

array($productId => $position)

  • access: public
array getProductsPosition ()
getRequestPath (line 724)

Retrieve Request Path

  • access: public
string getRequestPath ()
getStoreId (line 380)

Return store id.

If store id is underfined for category return current active store id

  • access: public
integer getStoreId ()
getStoreIds (line 319)

Retrieve array of store ids for category

  • access: public
array getStoreIds ()
getTreeModel (line 158)

Retrieve category tree model

  • access: public
getTreeModelInstance (line 168)

Enter description here...

  • access: public
getUrl (line 409)

Get category url

  • access: public
string getUrl ()
getUrlInstance (line 132)

Retrieve URL instance

  • access: public
Mage_Core_Model_Url getUrlInstance ()
getUrlPath (line 495)

Retrieve URL path

  • access: public
string getUrlPath ()
getUrlRewrite (line 145)

Get url rewrite model

  • access: public
Mage_Core_Model_Url_Rewrite getUrlRewrite ()
hasChildren (line 714)

Retrieve Is Category has children flag

  • access: public
bool hasChildren ()
isInRootCategoryList (line 849)

Check category is in Root Category list

  • access: public
bool isInRootCategoryList ()
move (line 183)

Move category

  • access: public
Mage_Catalog_Model_Category move (int $parentId, int $afterCategoryId)
  • int $parentId: new parent category id
  • int $afterCategoryId: category id after which we have put current category
setStoreId (line 394)

Set store id

  • access: public
Mage_Catalog_Model_Category setStoreId (integer $storeId)
  • integer $storeId
validate (line 921)

Validate attribute values

  • throws: Mage_Eav_Model_Entity_Attribute_Exception
  • access: public
bool|array validate ()
verifyIds (line 704)

Verify category ids

  • access: public
bool verifyIds ( $ids)
  • array $ids
_beforeDelete (line 744)

Before delete process

  • access: protected
Mage_Catalog_Model_Category _beforeDelete ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeDelete()
Processing object before delete data
_construct (line 117)

Initialize resource mode

  • access: protected
void _construct ()

Inherited Methods

Inherited From Mage_Catalog_Model_Abstract

Mage_Catalog_Model_Abstract::getAttributeDefaultValue()
Mage_Catalog_Model_Abstract::getExistsStoreValueFlag()
Mage_Catalog_Model_Abstract::getLockedAttributes()
Mage_Catalog_Model_Abstract::getResourceCollection()
Mage_Catalog_Model_Abstract::getStore()
Mage_Catalog_Model_Abstract::getWebsiteStoreIds()
Mage_Catalog_Model_Abstract::hasLockedAttributes()
Mage_Catalog_Model_Abstract::isDeleteable()
Mage_Catalog_Model_Abstract::isLockedAttribute()
Mage_Catalog_Model_Abstract::isReadonly()
Mage_Catalog_Model_Abstract::loadByAttribute()
Mage_Catalog_Model_Abstract::lockAttribute()
Mage_Catalog_Model_Abstract::setAttributeDefaultValue()
Mage_Catalog_Model_Abstract::setData()
Mage_Catalog_Model_Abstract::setExistsStoreValueFlag()
Mage_Catalog_Model_Abstract::setIsDeleteable()
Mage_Catalog_Model_Abstract::setIsReadonly()
Mage_Catalog_Model_Abstract::unlockAttribute()
Mage_Catalog_Model_Abstract::unlockAttributes()
Mage_Catalog_Model_Abstract::unsetData()
Mage_Catalog_Model_Abstract::_beforeSave()

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
CACHE_TAG = 'catalog_category' (line 50)
DM_MIXED = 'PRODUCTS_AND_PAGE' (line 47)
DM_PAGE = 'PAGE' (line 46)
DM_PRODUCT = 'PRODUCTS' (line 45)

Category display modes

ENTITY = 'catalog_category' (line 41)

Entity code.

Can be used as part of method name for entity processing

TREE_ROOT_ID = 1 (line 48)

Inherited Constants

Inherited from Mage_Catalog_Model_Abstract

Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID

Documentation generated on Fri, 11 Feb 2011 16:57:31 +0200 by phpDocumentor 1.4.3