Mage_Catalog_Block_Layer_Filter_Abstract Class Reference

Inheritance diagram for Mage_Catalog_Block_Layer_Filter_Abstract:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Catalog_Block_Layer_Filter_Attribute Mage_Catalog_Block_Layer_Filter_Category Mage_Catalog_Block_Layer_Filter_Price

List of all members.

Public Member Functions

 __construct ()
 init ()
 getName ()
 getItems ()
 getItemsCount ()
 getHtml ()

Protected Member Functions

 _initFilter ()
 _prepareFilter ()

Protected Attributes

 $_filter
 $_filterModelName


Detailed Description

Definition at line 34 of file Abstract.php.


Constructor & Destructor Documentation

__construct (  ) 

Initialize filter template

Reimplemented from Varien_Object.

Reimplemented in Mage_Catalog_Block_Layer_Filter_Attribute, Mage_Catalog_Block_Layer_Filter_Category, and Mage_Catalog_Block_Layer_Filter_Price.

Definition at line 54 of file Abstract.php.

00055     {
00056         parent::__construct();
00057         $this->setTemplate('catalog/layer/filter.phtml');
00058     }


Member Function Documentation

_initFilter (  )  [protected]

Init filter model object

Returns:
Mage_Catalog_Block_Layer_Filter_Abstract

Definition at line 76 of file Abstract.php.

00077     {
00078         if (!$this->_filterModelName) {
00079             Mage::throwException(Mage::helper('catalog')->__('Filter model name must be declared'));
00080         }
00081         $this->_filter = Mage::getModel($this->_filterModelName)
00082             ->setLayer($this->getLayer());
00083         $this->_prepareFilter();
00084 
00085         $this->_filter->apply($this->getRequest(), $this);
00086         return $this;
00087     }

_prepareFilter (  )  [protected]

Prepare filter process

Returns:
Mage_Catalog_Block_Layer_Filter_Abstract

Reimplemented in Mage_Catalog_Block_Layer_Filter_Attribute, and Mage_Catalog_Block_Layer_Filter_Price.

Definition at line 94 of file Abstract.php.

00095     {
00096         return $this;
00097     }

getHtml (  ) 

Retrieve block html

Returns:
string

Definition at line 134 of file Abstract.php.

00135     {
00136         return parent::_toHtml();
00137     }

getItems (  ) 

Retrieve filter items

Returns:
array

Definition at line 114 of file Abstract.php.

00115     {
00116         return $this->_filter->getItems();
00117     }

getItemsCount (  ) 

Retrieve filter items count

Returns:
int

Definition at line 124 of file Abstract.php.

00125     {
00126         return $this->_filter->getItemsCount();
00127     }

getName (  ) 

Retrieve name of the filter block

Returns:
string

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 104 of file Abstract.php.

00105     {
00106         return $this->_filter->getName();
00107     }

init (  ) 

Initialize filter model object

Returns:
Mage_Catalog_Block_Layer_Filter_Abstract

Definition at line 65 of file Abstract.php.

00066     {
00067         $this->_initFilter();
00068         return $this;
00069     }


Member Data Documentation

$_filter [protected]

Definition at line 41 of file Abstract.php.

$_filterModelName [protected]

Definition at line 48 of file Abstract.php.


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

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