Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Catalog_Block_Breadcrumbs
  • Mage_Catalog_Block_Category_View
  • Mage_Catalog_Block_Category_Widget_Link
  • Mage_Catalog_Block_Layer_Filter_Abstract
  • Mage_Catalog_Block_Layer_Filter_Attribute
  • Mage_Catalog_Block_Layer_Filter_Category
  • Mage_Catalog_Block_Layer_Filter_Decimal
  • Mage_Catalog_Block_Layer_Filter_Price
  • Mage_Catalog_Block_Layer_State
  • Mage_Catalog_Block_Layer_View
  • Mage_Catalog_Block_Navigation
  • Mage_Catalog_Block_Product
  • Mage_Catalog_Block_Product_Abstract
  • Mage_Catalog_Block_Product_Compare_Abstract
  • Mage_Catalog_Block_Product_Compare_List
  • Mage_Catalog_Block_Product_Compare_Sidebar
  • Mage_Catalog_Block_Product_Gallery
  • Mage_Catalog_Block_Product_List
  • Mage_Catalog_Block_Product_List_Crosssell
  • Mage_Catalog_Block_Product_List_Promotion
  • Mage_Catalog_Block_Product_List_Random
  • Mage_Catalog_Block_Product_List_Related
  • Mage_Catalog_Block_Product_List_Toolbar
  • Mage_Catalog_Block_Product_List_Upsell
  • Mage_Catalog_Block_Product_New
  • Mage_Catalog_Block_Product_Price
  • Mage_Catalog_Block_Product_Price_Template
  • Mage_Catalog_Block_Product_Send
  • Mage_Catalog_Block_Product_View
  • Mage_Catalog_Block_Product_View_Abstract
  • Mage_Catalog_Block_Product_View_Additional
  • Mage_Catalog_Block_Product_View_Attributes
  • Mage_Catalog_Block_Product_View_Description
  • Mage_Catalog_Block_Product_View_Media
  • Mage_Catalog_Block_Product_View_Options
  • Mage_Catalog_Block_Product_View_Options_Abstract
  • Mage_Catalog_Block_Product_View_Options_Type_Date
  • Mage_Catalog_Block_Product_View_Options_Type_Default
  • Mage_Catalog_Block_Product_View_Options_Type_File
  • Mage_Catalog_Block_Product_View_Options_Type_Select
  • Mage_Catalog_Block_Product_View_Options_Type_Text
  • Mage_Catalog_Block_Product_View_Price
  • Mage_Catalog_Block_Product_View_Tabs
  • Mage_Catalog_Block_Product_View_Type_Configurable
  • Mage_Catalog_Block_Product_View_Type_Grouped
  • Mage_Catalog_Block_Product_View_Type_Simple
  • Mage_Catalog_Block_Product_View_Type_Virtual
  • Mage_Catalog_Block_Product_Widget_Link
  • Mage_Catalog_Block_Product_Widget_New
  • Mage_Catalog_Block_Seo_Sitemap_Abstract
  • Mage_Catalog_Block_Seo_Sitemap_Category
  • Mage_Catalog_Block_Seo_Sitemap_Product
  • Mage_Catalog_Block_Seo_Sitemap_Tree_Category
  • Mage_Catalog_Block_Widget_Link
  • Mage_Catalog_CategoryController
  • Mage_Catalog_Exception
  • Mage_Catalog_Helper_Category
  • Mage_Catalog_Helper_Category_Flat
  • Mage_Catalog_Helper_Data
  • Mage_Catalog_Helper_Image
  • Mage_Catalog_Helper_Map
  • Mage_Catalog_Helper_Output
  • Mage_Catalog_Helper_Product
  • Mage_Catalog_Helper_Product_Compare
  • Mage_Catalog_Helper_Product_Configuration
  • Mage_Catalog_Helper_Product_Flat
  • Mage_Catalog_Helper_Product_Options
  • Mage_Catalog_Helper_Product_Url
  • Mage_Catalog_Helper_Product_View
  • Mage_Catalog_IndexController
  • Mage_Catalog_Model_Abstract
  • Mage_Catalog_Model_Api2_Product
  • Mage_Catalog_Model_Api2_Product_Category
  • Mage_Catalog_Model_Api2_Product_Category_Rest
  • Mage_Catalog_Model_Api2_Product_Category_Rest_Admin_V1
  • Mage_Catalog_Model_Api2_Product_Category_Rest_Customer_V1
  • Mage_Catalog_Model_Api2_Product_Category_Rest_Guest_V1
  • Mage_Catalog_Model_Api2_Product_Image
  • Mage_Catalog_Model_Api2_Product_Image_Rest
  • Mage_Catalog_Model_Api2_Product_Image_Rest_Admin_V1
  • Mage_Catalog_Model_Api2_Product_Image_Rest_Customer_V1
  • Mage_Catalog_Model_Api2_Product_Image_Rest_Guest_V1
  • Mage_Catalog_Model_Api2_Product_Image_Validator_Image
  • Mage_Catalog_Model_Api2_Product_Rest
  • Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
  • Mage_Catalog_Model_Api2_Product_Rest_Customer_V1
  • Mage_Catalog_Model_Api2_Product_Rest_Guest_V1
  • Mage_Catalog_Model_Api2_Product_Validator_Product
  • Mage_Catalog_Model_Api2_Product_Website
  • Mage_Catalog_Model_Api2_Product_Website_Rest
  • Mage_Catalog_Model_Api2_Product_Website_Rest_Admin_V1
  • Mage_Catalog_Model_Api2_Product_Website_Validator_Admin_Website
  • Mage_Catalog_Model_Api_Resource
  • Mage_Catalog_Model_Attribute_Backend_Customlayoutupdate
  • Mage_Catalog_Model_Category
  • Mage_Catalog_Model_Category_Api
  • Mage_Catalog_Model_Category_Api_V2
  • Mage_Catalog_Model_Category_Attribute_Api
  • Mage_Catalog_Model_Category_Attribute_Api_V2
  • Mage_Catalog_Model_Category_Attribute_Backend_Image
  • Mage_Catalog_Model_Category_Attribute_Backend_Sortby
  • Mage_Catalog_Model_Category_Attribute_Backend_Urlkey
  • Mage_Catalog_Model_Category_Attribute_Source_Layout
  • Mage_Catalog_Model_Category_Attribute_Source_Mode
  • Mage_Catalog_Model_Category_Attribute_Source_Page
  • Mage_Catalog_Model_Category_Attribute_Source_Sortby
  • Mage_Catalog_Model_Category_Indexer_Flat
  • Mage_Catalog_Model_Category_Indexer_Product
  • Mage_Catalog_Model_Config
  • Mage_Catalog_Model_Convert
  • Mage_Catalog_Model_Convert_Adapter_Catalog
  • Mage_Catalog_Model_Convert_Adapter_Product
  • Mage_Catalog_Model_Convert_Parser_Product
  • Mage_Catalog_Model_Design
  • Mage_Catalog_Model_Entity_Attribute
  • Mage_Catalog_Model_Entity_Product_Attribute_Frontend_Image
  • Mage_Catalog_Model_Index
  • Mage_Catalog_Model_Indexer_Url
  • Mage_Catalog_Model_Layer
  • Mage_Catalog_Model_Layer_Filter_Abstract
  • Mage_Catalog_Model_Layer_Filter_Attribute
  • Mage_Catalog_Model_Layer_Filter_Category
  • Mage_Catalog_Model_Layer_Filter_Decimal
  • Mage_Catalog_Model_Layer_Filter_Item
  • Mage_Catalog_Model_Layer_Filter_Price
  • Mage_Catalog_Model_Layer_Filter_Price_Algorithm
  • Mage_Catalog_Model_Layer_State
  • Mage_Catalog_Model_Observer
  • Mage_Catalog_Model_Product
  • Mage_Catalog_Model_Product_Action
  • Mage_Catalog_Model_Product_Api
  • Mage_Catalog_Model_Product_Api_V2
  • Mage_Catalog_Model_Product_Attribute_Api
  • Mage_Catalog_Model_Product_Attribute_Api_V2
  • Mage_Catalog_Model_Product_Attribute_Backend_Boolean
  • Mage_Catalog_Model_Product_Attribute_Backend_Groupprice
  • Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract
  • Mage_Catalog_Model_Product_Attribute_Backend_Media
  • Mage_Catalog_Model_Product_Attribute_Backend_Msrp
  • Mage_Catalog_Model_Product_Attribute_Backend_Price
  • Mage_Catalog_Model_Product_Attribute_Backend_Recurring
  • Mage_Catalog_Model_Product_Attribute_Backend_Sku
  • Mage_Catalog_Model_Product_Attribute_Backend_Startdate
  • Mage_Catalog_Model_Product_Attribute_Backend_Tierprice
  • Mage_Catalog_Model_Product_Attribute_Backend_Urlkey
  • Mage_Catalog_Model_Product_Attribute_Frontend_Image
  • Mage_Catalog_Model_Product_Attribute_Group
  • Mage_Catalog_Model_Product_Attribute_Media_Api
  • Mage_Catalog_Model_Product_Attribute_Media_Api_V2
  • Mage_Catalog_Model_Product_Attribute_Set_Api
  • Mage_Catalog_Model_Product_Attribute_Set_Api_V2
  • Mage_Catalog_Model_Product_Attribute_Source_Boolean
  • Mage_Catalog_Model_Product_Attribute_Source_Countryofmanufacture
  • Mage_Catalog_Model_Product_Attribute_Source_Layout
  • Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type
  • Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type_Enabled
  • Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type_Price
  • Mage_Catalog_Model_Product_Attribute_Tierprice_Api
  • Mage_Catalog_Model_Product_Attribute_Tierprice_Api_V2
  • Mage_Catalog_Model_Product_Compare_Item
  • Mage_Catalog_Model_Product_Compare_List
  • Mage_Catalog_Model_Product_Condition
  • Mage_Catalog_Model_Product_Configuration_Item_Option
  • Mage_Catalog_Model_Product_Flat_Flag
  • Mage_Catalog_Model_Product_Flat_Indexer
  • Mage_Catalog_Model_Product_Flat_Observer
  • Mage_Catalog_Model_Product_Image
  • Mage_Catalog_Model_Product_Indexer_Eav
  • Mage_Catalog_Model_Product_Indexer_Flat
  • Mage_Catalog_Model_Product_Indexer_Price
  • Mage_Catalog_Model_Product_Link
  • Mage_Catalog_Model_Product_Link_Api
  • Mage_Catalog_Model_Product_Link_Api_V2
  • Mage_Catalog_Model_Product_Media_Config
  • Mage_Catalog_Model_Product_Option
  • Mage_Catalog_Model_Product_Option_Api
  • Mage_Catalog_Model_Product_Option_Api_V2
  • Mage_Catalog_Model_Product_Option_Observer
  • Mage_Catalog_Model_Product_Option_Type_Date
  • Mage_Catalog_Model_Product_Option_Type_Default
  • Mage_Catalog_Model_Product_Option_Type_File
  • Mage_Catalog_Model_Product_Option_Type_Select
  • Mage_Catalog_Model_Product_Option_Type_Text
  • Mage_Catalog_Model_Product_Option_Value
  • Mage_Catalog_Model_Product_Option_Value_Api
  • Mage_Catalog_Model_Product_Option_Value_Api_V2
  • Mage_Catalog_Model_Product_Status
  • Mage_Catalog_Model_Product_Type
  • Mage_Catalog_Model_Product_Type_Abstract
  • Mage_Catalog_Model_Product_Type_Api
  • Mage_Catalog_Model_Product_Type_Api_V2
  • Mage_Catalog_Model_Product_Type_Configurable
  • Mage_Catalog_Model_Product_Type_Configurable_Attribute
  • Mage_Catalog_Model_Product_Type_Configurable_Price
  • Mage_Catalog_Model_Product_Type_Grouped
  • Mage_Catalog_Model_Product_Type_Grouped_Price
  • Mage_Catalog_Model_Product_Type_Price
  • Mage_Catalog_Model_Product_Type_Simple
  • Mage_Catalog_Model_Product_Type_Virtual
  • Mage_Catalog_Model_Product_Url
  • Mage_Catalog_Model_Product_Visibility
  • Mage_Catalog_Model_Product_Website
  • Mage_Catalog_Model_Resource_Abstract
  • Mage_Catalog_Model_Resource_Attribute
  • Mage_Catalog_Model_Resource_Category
  • Mage_Catalog_Model_Resource_Category_Attribute_Collection
  • Mage_Catalog_Model_Resource_Category_Attribute_Frontend_Image
  • Mage_Catalog_Model_Resource_Category_Attribute_Source_Layout
  • Mage_Catalog_Model_Resource_Category_Attribute_Source_Mode
  • Mage_Catalog_Model_Resource_Category_Attribute_Source_Page
  • Mage_Catalog_Model_Resource_Category_Collection
  • Mage_Catalog_Model_Resource_Category_Flat
  • Mage_Catalog_Model_Resource_Category_Flat_Collection
  • Mage_Catalog_Model_Resource_Category_Indexer_Product
  • Mage_Catalog_Model_Resource_Category_Tree
  • Mage_Catalog_Model_Resource_Collection_Abstract
  • Mage_Catalog_Model_Resource_Config
  • Mage_Catalog_Model_Resource_Eav_Attribute
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Abstract
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Attribute
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Attribute_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Attribute_Frontend_Image
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Attribute_Source_Layout
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Attribute_Source_Mode
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Attribute_Source_Page
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Collection_Abstract
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Config
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Attribute
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Decimal
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Price
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Action
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Image
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Media
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Tierprice
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Urlkey
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Frontend_Image
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Frontend_Tierprice
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Abstract
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Abstract
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Decimal
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Eav_Source
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Configurable
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Default
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Grouped
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Value
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Value_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Relation
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Status
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Product_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Website
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Sendfriend
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Sendfriend_Collection
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Setup
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Url
  • Mage_Catalog_Model_Resource_Helper_Mysql4
  • Mage_Catalog_Model_Resource_Layer_Filter_Attribute
  • Mage_Catalog_Model_Resource_Layer_Filter_Decimal
  • Mage_Catalog_Model_Resource_Layer_Filter_Price
  • Mage_Catalog_Model_Resource_Product
  • Mage_Catalog_Model_Resource_Product_Action
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice_Abstract
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Image
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice
  • Mage_Catalog_Model_Resource_Product_Attribute_Backend_Urlkey
  • Mage_Catalog_Model_Resource_Product_Attribute_Collection
  • Mage_Catalog_Model_Resource_Product_Attribute_Frontend_Image
  • Mage_Catalog_Model_Resource_Product_Attribute_Frontend_Tierprice
  • Mage_Catalog_Model_Resource_Product_Collection
  • Mage_Catalog_Model_Resource_Product_Compare_Item
  • Mage_Catalog_Model_Resource_Product_Compare_Item_Collection
  • Mage_Catalog_Model_Resource_Product_Flat
  • Mage_Catalog_Model_Resource_Product_Flat_Indexer
  • Mage_Catalog_Model_Resource_Product_Indexer_Abstract
  • Mage_Catalog_Model_Resource_Product_Indexer_Eav
  • Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract
  • Mage_Catalog_Model_Resource_Product_Indexer_Eav_Decimal
  • Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source
  • Mage_Catalog_Model_Resource_Product_Indexer_Price
  • Mage_Catalog_Model_Resource_Product_Indexer_Price_Configurable
  • Mage_Catalog_Model_Resource_Product_Indexer_Price_Default
  • Mage_Catalog_Model_Resource_Product_Indexer_Price_Grouped
  • Mage_Catalog_Model_Resource_Product_Link
  • Mage_Catalog_Model_Resource_Product_Link_Collection
  • Mage_Catalog_Model_Resource_Product_Link_Product_Collection
  • Mage_Catalog_Model_Resource_Product_Option
  • Mage_Catalog_Model_Resource_Product_Option_Collection
  • Mage_Catalog_Model_Resource_Product_Option_Value
  • Mage_Catalog_Model_Resource_Product_Option_Value_Collection
  • Mage_Catalog_Model_Resource_Product_Relation
  • Mage_Catalog_Model_Resource_Product_Status
  • Mage_Catalog_Model_Resource_Product_Type_Configurable
  • Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute
  • Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection
  • Mage_Catalog_Model_Resource_Product_Type_Configurable_Product_Collection
  • Mage_Catalog_Model_Resource_Product_Website
  • Mage_Catalog_Model_Resource_Setup
  • Mage_Catalog_Model_Resource_Url
  • Mage_Catalog_Model_Session
  • Mage_Catalog_Model_System_Config_Backend_Catalog_Category_Flat
  • Mage_Catalog_Model_System_Config_Backend_Catalog_Product_Flat
  • Mage_Catalog_Model_System_Config_Backend_Catalog_Url_Rewrite_Suffix
  • Mage_Catalog_Model_Template_Filter
  • Mage_Catalog_Model_Url
  • Mage_Catalog_Product_CompareController
  • Mage_Catalog_ProductController
  • Mage_Catalog_Seo_SitemapController
  • Mage_CatalogSearch_Model_Resource_Helper_Mysql4
  • Mage_XmlConnect_Model_Catalog_Category_Media_Config

Interfaces

  • Mage_Catalog_Helper_Product_Configuration_Interface
  • Mage_Catalog_Model_Product_Condition_Interface
  • Mage_Catalog_Model_Product_Configuration_Item_Interface
  • Mage_Catalog_Model_Product_Configuration_Item_Option_Interface
  • Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Interface
  • Mage_Catalog_Model_Resource_Product_Indexer_Price_Interface
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Catalog
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: 
 28: /**
 29:  * Catalog category
 30:  *
 31:  * @category   Mage
 32:  * @package    Mage_Catalog
 33:  * @author     Magento Core Team <core@magentocommerce.com>
 34:  */
 35: class Mage_Catalog_Model_Category extends Mage_Catalog_Model_Abstract
 36: {
 37:     /**
 38:      * Entity code.
 39:      * Can be used as part of method name for entity processing
 40:      */
 41:     const ENTITY                = 'catalog_category';
 42:     /**
 43:      * Category display modes
 44:      */
 45:     const DM_PRODUCT            = 'PRODUCTS';
 46:     const DM_PAGE               = 'PAGE';
 47:     const DM_MIXED              = 'PRODUCTS_AND_PAGE';
 48:     const TREE_ROOT_ID          = 1;
 49: 
 50:     const CACHE_TAG             = 'catalog_category';
 51: 
 52:     /**
 53:      * Prefix of model events names
 54:      *
 55:      * @var string
 56:      */
 57:     protected $_eventPrefix     = 'catalog_category';
 58: 
 59:     /**
 60:      * Parameter name in event
 61:      *
 62:      * @var string
 63:      */
 64:     protected $_eventObject     = 'category';
 65: 
 66:     /**
 67:      * Model cache tag for clear cache in after save and after delete
 68:      */
 69:     protected $_cacheTag        = self::CACHE_TAG;
 70: 
 71:     /**
 72:      * URL Model instance
 73:      *
 74:      * @var Mage_Core_Model_Url
 75:      */
 76:     protected static $_url;
 77: 
 78:     /**
 79:      * URL rewrite model
 80:      *
 81:      * @var Mage_Core_Model_Url_Rewrite
 82:      */
 83:     protected static $_urlRewrite;
 84: 
 85:     /**
 86:      * Use flat resource model flag
 87:      *
 88:      * @var bool
 89:      */
 90:     protected $_useFlatResource = false;
 91: 
 92:     /**
 93:      * Category design attributes
 94:      *
 95:      * @var array
 96:      */
 97:     private $_designAttributes  = array(
 98:         'custom_design',
 99:         'custom_design_from',
100:         'custom_design_to',
101:         'page_layout',
102:         'custom_layout_update',
103:         'custom_apply_to_products'
104:     );
105: 
106:     /**
107:      * Category tree model
108:      *
109:      * @var Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree
110:      */
111:     protected $_treeModel = null;
112: 
113:     /**
114:      * Initialize resource mode
115:      *
116:      */
117:     protected function _construct()
118:     {
119:         if (Mage::helper('catalog/category_flat')->isEnabled()) {
120:             $this->_init('catalog/category_flat');
121:             $this->_useFlatResource = true;
122:         } else {
123:             $this->_init('catalog/category');
124:         }
125:     }
126: 
127:     /**
128:      * Retrieve URL instance
129:      *
130:      * @return Mage_Core_Model_Url
131:      */
132:     public function getUrlInstance()
133:     {
134:         if (!self::$_url) {
135:             self::$_url = Mage::getModel('core/url');
136:         }
137:         return self::$_url;
138:     }
139: 
140:     /**
141:      * Get url rewrite model
142:      *
143:      * @return Mage_Core_Model_Url_Rewrite
144:      */
145:     public function getUrlRewrite()
146:     {
147:         if (!self::$_urlRewrite) {
148:             self::$_urlRewrite = Mage::getModel('core/url_rewrite');
149:         }
150:         return self::$_urlRewrite;
151:     }
152: 
153:     /**
154:      * Retrieve category tree model
155:      *
156:      * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree
157:      */
158:     public function getTreeModel()
159:     {
160:         return Mage::getResourceModel('catalog/category_tree');
161:     }
162: 
163:     /**
164:      * Enter description here...
165:      *
166:      * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree
167:      */
168:     public function getTreeModelInstance()
169:     {
170:         if (is_null($this->_treeModel)) {
171:             $this->_treeModel = Mage::getResourceSingleton('catalog/category_tree');
172:         }
173:         return $this->_treeModel;
174:     }
175: 
176:     /**
177:      * Move category
178:      *
179:      * @param   int $parentId new parent category id
180:      * @param   int $afterCategoryId category id after which we have put current category
181:      * @return  Mage_Catalog_Model_Category
182:      */
183:     public function move($parentId, $afterCategoryId)
184:     {
185:         /**
186:          * Validate new parent category id. (category model is used for backward
187:          * compatibility in event params)
188:          */
189:         $parent = Mage::getModel('catalog/category')
190:             ->setStoreId($this->getStoreId())
191:             ->load($parentId);
192: 
193:         if (!$parent->getId()) {
194:             Mage::throwException(
195:                 Mage::helper('catalog')->__('Category move operation is not possible: the new parent category was not found.')
196:             );
197:         }
198: 
199:         if (!$this->getId()) {
200:             Mage::throwException(
201:                 Mage::helper('catalog')->__('Category move operation is not possible: the current category was not found.')
202:             );
203:         } elseif ($parent->getId() == $this->getId()) {
204:             Mage::throwException(
205:                 Mage::helper('catalog')->__('Category move operation is not possible: parent category is equal to child category.')
206:             );
207:         }
208: 
209:         /**
210:          * Setting affected category ids for third party engine index refresh
211:         */
212:         $this->setMovedCategoryId($this->getId());
213: 
214:         $eventParams = array(
215:             $this->_eventObject => $this,
216:             'parent'        => $parent,
217:             'category_id'   => $this->getId(),
218:             'prev_parent_id'=> $this->getParentId(),
219:             'parent_id'     => $parentId
220:         );
221:         $moveComplete = false;
222: 
223:         $this->_getResource()->beginTransaction();
224:         try {
225:             /**
226:              * catalog_category_tree_move_before and catalog_category_tree_move_after
227:              * events declared for backward compatibility
228:              */
229:             Mage::dispatchEvent('catalog_category_tree_move_before', $eventParams);
230:             Mage::dispatchEvent($this->_eventPrefix.'_move_before', $eventParams);
231: 
232:             $this->getResource()->changeParent($this, $parent, $afterCategoryId);
233: 
234:             Mage::dispatchEvent($this->_eventPrefix.'_move_after', $eventParams);
235:             Mage::dispatchEvent('catalog_category_tree_move_after', $eventParams);
236:             $this->_getResource()->commit();
237: 
238:             // Set data for indexer
239:             $this->setAffectedCategoryIds(array($this->getId(), $this->getParentId(), $parentId));
240: 
241:             $moveComplete = true;
242:         } catch (Exception $e) {
243:             $this->_getResource()->rollBack();
244:             throw $e;
245:         }
246:         if ($moveComplete) {
247:             Mage::dispatchEvent('category_move', $eventParams);
248:             Mage::getSingleton('index/indexer')->processEntityAction(
249:                 $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE
250:             );
251:             Mage::app()->cleanCache(array(self::CACHE_TAG));
252:         }
253: 
254:         return $this;
255:     }
256: 
257:     /**
258:      * Retrieve default attribute set id
259:      *
260:      * @return int
261:      */
262:     public function getDefaultAttributeSetId()
263:     {
264:         return $this->getResource()->getEntityType()->getDefaultAttributeSetId();
265:     }
266: 
267:     /**
268:      * Get category products collection
269:      *
270:      * @return Varien_Data_Collection_Db
271:      */
272:     public function getProductCollection()
273:     {
274:         $collection = Mage::getResourceModel('catalog/product_collection')
275:             ->setStoreId($this->getStoreId())
276:             ->addCategoryFilter($this);
277:         return $collection;
278:     }
279: 
280:     /**
281:      * Retrieve all customer attributes
282:      *
283:      * @todo Use with Flat Resource
284:      * @return array
285:      */
286:     public function getAttributes($noDesignAttributes = false)
287:     {
288:         $result = $this->getResource()
289:             ->loadAllAttributes($this)
290:             ->getSortedAttributes();
291: 
292:         if ($noDesignAttributes){
293:             foreach ($result as $k=>$a){
294:                 if (in_array($k, $this->_designAttributes)) {
295:                     unset($result[$k]);
296:                 }
297:             }
298:         }
299: 
300:         return $result;
301:     }
302: 
303:     /**
304:      * Retrieve array of product id's for category
305:      *
306:      * array($productId => $position)
307:      *
308:      * @return array
309:      */
310:     public function getProductsPosition()
311:     {
312:         if (!$this->getId()) {
313:             return array();
314:         }
315: 
316:         $array = $this->getData('products_position');
317:         if (is_null($array)) {
318:             $array = $this->getResource()->getProductsPosition($this);
319:             $this->setData('products_position', $array);
320:         }
321:         return $array;
322:     }
323: 
324:     /**
325:      * Retrieve array of store ids for category
326:      *
327:      * @return array
328:      */
329:     public function getStoreIds()
330:     {
331:         if ($this->getInitialSetupFlag()) {
332:             return array();
333:         }
334: 
335:         if ($storeIds = $this->getData('store_ids')) {
336:             return $storeIds;
337:         }
338: 
339:         if (!$this->getId()) {
340:             return array();
341:         }
342: 
343:         $nodes = array();
344:         foreach ($this->getPathIds() as $id) {
345:             $nodes[] = $id;
346:         }
347: 
348:         $storeIds = array();
349:         $storeCollection = Mage::getModel('core/store')->getCollection()->loadByCategoryIds($nodes);
350:         foreach ($storeCollection as $store) {
351:             $storeIds[$store->getId()] = $store->getId();
352:         }
353: 
354:         $entityStoreId = $this->getStoreId();
355:         if (!in_array($entityStoreId, $storeIds)) {
356:             array_unshift($storeIds, $entityStoreId);
357:         }
358:         if (!in_array(0, $storeIds)) {
359:             array_unshift($storeIds, 0);
360:         }
361: 
362:         $this->setData('store_ids', $storeIds);
363:         return $storeIds;
364:     }
365: 
366:     /**
367:      * Retrieve Layout Update Handle name
368:      *
369:      * @return string
370:      */
371:     public function getLayoutUpdateHandle()
372:     {
373:         $layout = 'catalog_category_';
374:         if ($this->getIsAnchor()) {
375:             $layout .= 'layered';
376:         }
377:         else {
378:             $layout .= 'default';
379:         }
380:         return $layout;
381:     }
382: 
383:     /**
384:      * Return store id.
385:      *
386:      * If store id is underfined for category return current active store id
387:      *
388:      * @return integer
389:      */
390:     public function getStoreId()
391:     {
392:         if ($this->hasData('store_id')) {
393:             return $this->_getData('store_id');
394:         }
395:         return Mage::app()->getStore()->getId();
396:     }
397: 
398:     /**
399:      * Set store id
400:      *
401:      * @param integer $storeId
402:      * @return Mage_Catalog_Model_Category
403:      */
404:     public function setStoreId($storeId)
405:     {
406:         if (!is_numeric($storeId)) {
407:             $storeId = Mage::app($storeId)->getStore()->getId();
408:         }
409:         $this->setData('store_id', $storeId);
410:         $this->getResource()->setStoreId($storeId);
411:         return $this;
412:     }
413: 
414:     /**
415:      * Get category url
416:      *
417:      * @return string
418:      */
419:     public function getUrl()
420:     {
421:         $url = $this->_getData('url');
422:         if (is_null($url)) {
423:             Varien_Profiler::start('REWRITE: '.__METHOD__);
424: 
425:             if ($this->hasData('request_path') && $this->getRequestPath() != '') {
426:                 $this->setData('url', $this->getUrlInstance()->getDirectUrl($this->getRequestPath()));
427:                 Varien_Profiler::stop('REWRITE: '.__METHOD__);
428:                 return $this->getData('url');
429:             }
430: 
431:             Varien_Profiler::stop('REWRITE: '.__METHOD__);
432: 
433:             $rewrite = $this->getUrlRewrite();
434:             if ($this->getStoreId()) {
435:                 $rewrite->setStoreId($this->getStoreId());
436:             }
437:             $idPath = 'category/' . $this->getId();
438:             $rewrite->loadByIdPath($idPath);
439: 
440:             if ($rewrite->getId()) {
441:                 $this->setData('url', $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath()));
442:                 Varien_Profiler::stop('REWRITE: '.__METHOD__);
443:                 return $this->getData('url');
444:             }
445: 
446:             Varien_Profiler::stop('REWRITE: '.__METHOD__);
447: 
448:             $this->setData('url', $this->getCategoryIdUrl());
449:             return $this->getData('url');
450:         }
451:         return $url;
452:     }
453: 
454:     /**
455:      * Retrieve category id URL
456:      *
457:      * @return string
458:      */
459:     public function getCategoryIdUrl()
460:     {
461:         Varien_Profiler::start('REGULAR: '.__METHOD__);
462:         $urlKey = $this->getUrlKey() ? $this->getUrlKey() : $this->formatUrlKey($this->getName());
463:         $url = $this->getUrlInstance()->getUrl('catalog/category/view', array(
464:             's'=>$urlKey,
465:             'id'=>$this->getId(),
466:         ));
467:         Varien_Profiler::stop('REGULAR: '.__METHOD__);
468:         return $url;
469:     }
470: 
471:     /**
472:      * Format URL key from name or defined key
473:      *
474:      * @param string $str
475:      * @return string
476:      */
477:     public function formatUrlKey($str)
478:     {
479:         $str = Mage::helper('core')->removeAccents($str);
480:         $urlKey = preg_replace('#[^0-9a-z]+#i', '-', $str);
481:         $urlKey = strtolower($urlKey);
482:         $urlKey = trim($urlKey, '-');
483:         return $urlKey;
484:     }
485: 
486:     /**
487:      * Retrieve image URL
488:      *
489:      * @return string
490:      */
491:     public function getImageUrl()
492:     {
493:         $url = false;
494:         if ($image = $this->getImage()) {
495:             $url = Mage::getBaseUrl('media').'catalog/category/'.$image;
496:         }
497:         return $url;
498:     }
499: 
500:     /**
501:      * Retrieve URL path
502:      *
503:      * @return string
504:      */
505:     public function getUrlPath()
506:     {
507:         $path = $this->getData('url_path');
508:         if ($path) {
509:             return $path;
510:         }
511: 
512:         $path = $this->getUrlKey();
513: 
514:         if ($this->getParentId()) {
515:             $parentPath = Mage::getModel('catalog/category')->load($this->getParentId())->getCategoryPath();
516:             $path = $parentPath.'/'.$path;
517:         }
518: 
519:         $this->setUrlPath($path);
520: 
521:         return $path;
522:     }
523: 
524:     /**
525:      * Get parent category object
526:      *
527:      * @return Mage_Catalog_Model_Category
528:      */
529:     public function getParentCategory()
530:     {
531:         if (!$this->hasData('parent_category')) {
532:             $this->setData('parent_category', Mage::getModel('catalog/category')->load($this->getParentId()));
533:         }
534:         return $this->_getData('parent_category');
535:     }
536: 
537:     /**
538:      * Get parent category identifier
539:      *
540:      * @return int
541:      */
542:     public function getParentId()
543:     {
544:         $parentIds = $this->getParentIds();
545:         return intval(array_pop($parentIds));
546:     }
547: 
548:     /**
549:      * Get all parent categories ids
550:      *
551:      * @return array
552:      */
553:     public function getParentIds()
554:     {
555:         return array_diff($this->getPathIds(), array($this->getId()));
556:     }
557: 
558:     /**
559:      * Retrieve dates for custom design (from & to)
560:      *
561:      * @return array
562:      */
563:     public function getCustomDesignDate()
564:     {
565:         $result = array();
566:         $result['from'] = $this->getData('custom_design_from');
567:         $result['to'] = $this->getData('custom_design_to');
568: 
569:         return $result;
570:     }
571: 
572:     /**
573:      * Retrieve design attributes array
574:      *
575:      * @return array
576:      */
577:     public function getDesignAttributes()
578:     {
579:         $result = array();
580:         foreach ($this->_designAttributes as $attrName) {
581:             $result[] = $this->_getAttribute($attrName);
582:         }
583:         return $result;
584:     }
585: 
586:     /**
587:      * Retrieve attribute by code
588:      *
589:      * @param string $attributeCode
590:      * @return Mage_Eav_Model_Entity_Attribute_Abstract
591:      */
592:     private function _getAttribute($attributeCode)
593:     {
594:         if (!$this->_useFlatResource) {
595:             $attribute = $this->getResource()->getAttribute($attributeCode);
596:         }
597:         else {
598:             $attribute = Mage::getSingleton('catalog/config')
599:                 ->getAttribute(self::ENTITY, $attributeCode);
600:         }
601:         return $attribute;
602:     }
603: 
604:     /**
605:      * Get all children categories IDs
606:      *
607:      * @param boolean $asArray return result as array instead of comma-separated list of IDs
608:      * @return array|string
609:      */
610:     public function getAllChildren($asArray = false)
611:     {
612:         $children = $this->getResource()->getAllChildren($this);
613:         if ($asArray) {
614:             return $children;
615:         }
616:         else {
617:             return implode(',', $children);
618:         }
619: 
620: //        $this->getTreeModelInstance()->load();
621: //        $children = $this->getTreeModelInstance()->getChildren($this->getId());
622: //
623: //        $myId = array($this->getId());
624: //        if (is_array($children)) {
625: //            $children = array_merge($myId, $children);
626: //        }
627: //        else {
628: //            $children = $myId;
629: //        }
630: //        if ($asArray) {
631: //            return $children;
632: //        }
633: //        else {
634: //            return implode(',', $children);
635: //        }
636:     }
637: 
638:     /**
639:      * Retrieve children ids comma separated
640:      *
641:      * @return string
642:      */
643:     public function getChildren()
644:     {
645:         return implode(',', $this->getResource()->getChildren($this, false));
646:     }
647: 
648:     /**
649:      * Retrieve Stores where isset category Path
650:      * Return comma separated string
651:      *
652:      * @return string
653:      */
654:     public function getPathInStore()
655:     {
656:         $result = array();
657:         //$path = $this->getTreeModelInstance()->getPath($this->getId());
658:         $path = array_reverse($this->getPathIds());
659:         foreach ($path as $itemId) {
660:             if ($itemId == Mage::app()->getStore()->getRootCategoryId()) {
661:                 break;
662:             }
663:             $result[] = $itemId;
664:         }
665:         return implode(',', $result);
666:     }
667: 
668:     /**
669:      * Check category id exising
670:      *
671:      * @param   int $id
672:      * @return  bool
673:      */
674:     public function checkId($id)
675:     {
676:         return $this->_getResource()->checkId($id);
677:     }
678: 
679:     /**
680:      * Get array categories ids which are part of category path
681:      * Result array contain id of current category because it is part of the path
682:      *
683:      * @return array
684:      */
685:     public function getPathIds()
686:     {
687:         $ids = $this->getData('path_ids');
688:         if (is_null($ids)) {
689:             $ids = explode('/', $this->getPath());
690:             $this->setData('path_ids', $ids);
691:         }
692:         return $ids;
693:     }
694: 
695:     /**
696:      * Retrieve level
697:      *
698:      * @return int
699:      */
700:     public function getLevel()
701:     {
702:         if (!$this->hasLevel()) {
703:             return count(explode('/', $this->getPath())) - 1;
704:         }
705:         return $this->getData('level');
706:     }
707: 
708:     /**
709:      * Verify category ids
710:      *
711:      * @param array $ids
712:      * @return bool
713:      */
714:     public function verifyIds(array $ids)
715:     {
716:         return $this->getResource()->verifyIds($ids);
717:     }
718: 
719:     /**
720:      * Retrieve Is Category has children flag
721:      *
722:      * @return bool
723:      */
724:     public function hasChildren()
725:     {
726:         return $this->_getResource()->getChildrenAmount($this) > 0;
727:     }
728: 
729:     /**
730:      * Retrieve Request Path
731:      *
732:      * @return string
733:      */
734:     public function getRequestPath()
735:     {
736:         return $this->_getData('request_path');
737:     }
738: 
739:     /**
740:      * Retrieve Name data wrapper
741:      *
742:      * @return string
743:      */
744:     public function getName()
745:     {
746:         return $this->_getData('name');
747:     }
748: 
749:     /**
750:      * Before delete process
751:      *
752:      * @return Mage_Catalog_Model_Category
753:      */
754:     protected function _beforeDelete()
755:     {
756:         $this->_protectFromNonAdmin();
757:         if ($this->getResource()->isForbiddenToDelete($this->getId())) {
758:             Mage::throwException("Can't delete root category.");
759:         }
760:         return parent::_beforeDelete();
761:     }
762: 
763:     /**
764:      * Retrieve anchors above
765:      *
766:      * @return array
767:      */
768:     public function getAnchorsAbove()
769:     {
770:         $anchors = array();
771:         $path = $this->getPathIds();
772: 
773:         if (in_array($this->getId(), $path)) {
774:             unset($path[array_search($this->getId(), $path)]);
775:         }
776: 
777:         if ($this->_useFlatResource) {
778:             $anchors = $this->_getResource()->getAnchorsAbove($path, $this->getStoreId());
779:         }
780:         else {
781:             if (!Mage::registry('_category_is_anchor_attribute')) {
782:                 $model = $this->_getAttribute('is_anchor');
783:                 Mage::register('_category_is_anchor_attribute', $model);
784:             }
785: 
786:             if ($isAnchorAttribute = Mage::registry('_category_is_anchor_attribute')) {
787:                 $anchors = $this->getResource()->findWhereAttributeIs($path, $isAnchorAttribute, 1);
788:             }
789:         }
790:         return $anchors;
791:     }
792: 
793:     /**
794:      * Retrieve count products of category
795:      *
796:      * @return int
797:      */
798:     public function getProductCount()
799:     {
800:         if (!$this->hasProductCount()) {
801:             $count = $this->_getResource()->getProductCount($this); // load product count
802:             $this->setData('product_count', $count);
803:         }
804:         return $this->getData('product_count');
805:     }
806: 
807:     /**
808:      * Retrieve categories by parent
809:      *
810:      * @param int $parent
811:      * @param int $recursionLevel
812:      * @param bool $sorted
813:      * @param bool $asCollection
814:      * @param bool $toLoad
815:      * @return mixed
816:      */
817:     public function getCategories($parent, $recursionLevel = 0, $sorted=false, $asCollection=false, $toLoad=true)
818:     {
819:         $categories = $this->getResource()
820:             ->getCategories($parent, $recursionLevel, $sorted, $asCollection, $toLoad);
821:         return $categories;
822:     }
823: 
824:     /**
825:      * Return parent categories of current category
826:      *
827:      * @return array
828:      */
829:     public function getParentCategories()
830:     {
831:         return $this->getResource()->getParentCategories($this);
832:     }
833: 
834:     /**
835:      * Retuen children categories of current category
836:      *
837:      * @return array
838:      */
839:     public function getChildrenCategories()
840:     {
841:         return $this->getResource()->getChildrenCategories($this);
842:     }
843: 
844:     /**
845:      * Return parent category of current category with own custom design settings
846:      *
847:      * @return Mage_Catalog_Model_Category
848:      */
849:     public function getParentDesignCategory()
850:     {
851:         return $this->getResource()->getParentDesignCategory($this);
852:     }
853: 
854:     /**
855:      * Check category is in Root Category list
856:      *
857:      * @return bool
858:      */
859:     public function isInRootCategoryList()
860:     {
861:         return $this->getResource()->isInRootCategoryList($this);
862:     }
863: 
864:     /**
865:      * Retrieve Available int Product Listing sort by
866:      *
867:      * @return null|array
868:      */
869:     public function getAvailableSortBy()
870:     {
871:         $available = $this->getData('available_sort_by');
872:         if (empty($available)) {
873:             return array();
874:         }
875:         if ($available && !is_array($available)) {
876:             $available = explode(',', $available);
877:         }
878:         return $available;
879:     }
880: 
881:     /**
882:      * Retrieve Available Product Listing  Sort By
883:      * code as key, value - name
884:      *
885:      * @return array
886:      */
887:     public function getAvailableSortByOptions() {
888:         $availableSortBy = array();
889:         $defaultSortBy   = Mage::getSingleton('catalog/config')
890:             ->getAttributeUsedForSortByArray();
891:         if ($this->getAvailableSortBy()) {
892:             foreach ($this->getAvailableSortBy() as $sortBy) {
893:                 if (isset($defaultSortBy[$sortBy])) {
894:                     $availableSortBy[$sortBy] = $defaultSortBy[$sortBy];
895:                 }
896:             }
897:         }
898: 
899:         if (!$availableSortBy) {
900:             $availableSortBy = $defaultSortBy;
901:         }
902: 
903:         return $availableSortBy;
904:     }
905: 
906:     /**
907:      * Retrieve Product Listing Default Sort By
908:      *
909:      * @return string
910:      */
911:     public function getDefaultSortBy() {
912:         if (!$sortBy = $this->getData('default_sort_by')) {
913:             $sortBy = Mage::getSingleton('catalog/config')
914:                 ->getProductListDefaultSortBy($this->getStoreId());
915:         }
916:         $available = $this->getAvailableSortByOptions();
917:         if (!isset($available[$sortBy])) {
918:             $sortBy = array_keys($available);
919:             $sortBy = $sortBy[0];
920:         }
921: 
922:         return $sortBy;
923:     }
924: 
925:     /**
926:      * Validate attribute values
927:      *
928:      * @throws Mage_Eav_Model_Entity_Attribute_Exception
929:      * @return bool|array
930:      */
931:     public function validate()
932:     {
933:         return $this->_getResource()->validate($this);
934:     }
935: 
936:     /**
937:      * Init indexing process after category save
938:      *
939:      * @return Mage_Catalog_Model_Category
940:      */
941:     protected function _afterSave()
942:     {
943:         $result = parent::_afterSave();
944:         Mage::getSingleton('index/indexer')->processEntityAction(
945:             $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE
946:         );
947:         return $result;
948:     }
949: }
950: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0