Mage_Catalog_Model_Category_Attribute_Source_Sortby Class Reference

Inheritance diagram for Mage_Catalog_Model_Category_Attribute_Source_Sortby:

Mage_Eav_Model_Entity_Attribute_Source_Abstract Mage_Eav_Model_Entity_Attribute_Source_Interface

List of all members.

Public Member Functions

 getAllOptions ()

Protected Member Functions

 _getCatalogConfig ()


Detailed Description

Definition at line 35 of file Sortby.php.


Member Function Documentation

_getCatalogConfig (  )  [protected]

Retrieve Catalog Config Singleton

Returns:
Mage_Catalog_Model_Config

Definition at line 43 of file Sortby.php.

00043                                            {
00044         return Mage::getSingleton('catalog/config');
00045     }

getAllOptions (  ) 

Retrieve All options

Returns:
array

Implements Mage_Eav_Model_Entity_Attribute_Source_Interface.

Definition at line 52 of file Sortby.php.

00053     {
00054         if (is_null($this->_options)) {
00055             $this->_options = array(array(
00056                 'label' => Mage::helper('catalog')->__('Best Value'),
00057                 'value' => 'position'
00058             ));
00059             foreach ($this->_getCatalogConfig()->getAttributesUsedForSortBy() as $attribute) {
00060                 $this->_options[] = array(
00061                     'label' => Mage::helper('catalog')->__($attribute['frontend_label']),
00062                     'value' => $attribute['attribute_code']
00063                 );
00064             }
00065         }
00066         return $this->_options;
00067     }


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

Generated on Sat Jul 4 17:23:38 2009 for Magento by  doxygen 1.5.8