Mage_Catalog_Model_Layer_Filter_Item Class Reference

Inheritance diagram for Mage_Catalog_Model_Layer_Filter_Item:

Varien_Object

List of all members.

Public Member Functions

 getFilter ()
 getUrl ()
 getRemoveUrl ()
 getName ()
 getValueString ()


Detailed Description

Definition at line 34 of file Item.php.


Member Function Documentation

getFilter (  ) 

Get filter instance

Returns:
Mage_Catalog_Model_Layer_Filter_Abstract

Definition at line 41 of file Item.php.

00042     {
00043         $filter = $this->getData('filter');
00044         if (!is_object($filter)) {
00045             Mage::throwException(
00046                 Mage::helper('catalog')->__('Filter must be as object. Set correct filter please')
00047             );
00048         }
00049         return $filter;
00050     }

getName (  ) 

Get item filter name

Returns:
string

Definition at line 85 of file Item.php.

00086     {
00087         return $this->getFilter()->getName();
00088     }

getRemoveUrl (  ) 

Get url for remove item from filter

Returns:
string

Definition at line 71 of file Item.php.

00072     {
00073         $query = array($this->getFilter()->getRequestVar()=>$this->getFilter()->getResetValue());
00074         $params['_current']     = true;
00075         $params['_use_rewrite'] = true;
00076         $params['_query']       = $query;
00077         return Mage::getUrl('*/*/*', $params);
00078     }

getUrl (  ) 

Get filter item url

Returns:
string

Definition at line 57 of file Item.php.

00058     {
00059         $query = array(
00060             $this->getFilter()->getRequestVar()=>$this->getValue(),
00061             Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
00062         );
00063         return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
00064     }

getValueString (  ) 

Get item value as string

Returns:
string

Definition at line 95 of file Item.php.

00096     {
00097         $value = $this->getValue();
00098         if (is_array($value)) {
00099             return implode(',', $value);
00100         }
00101         return $value;
00102     }


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

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