Mage_Tag_Block_Product_List Class Reference

Inheritance diagram for Mage_Tag_Block_Product_List:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getCount ()
 getTags ()
 getProductId ()
 getFormAction ()

Protected Member Functions

 _getCollection ()
 _beforeToHtml ()

Protected Attributes

 $_collection


Detailed Description

Definition at line 27 of file List.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Before rendering html, but after trying to load cache

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 65 of file List.php.

00066     {
00067         if (!$this->getProductId()) {
00068             return false;
00069         }
00070 
00071         return parent::_beforeToHtml();
00072     }

_getCollection (  )  [protected]

Definition at line 49 of file List.php.

00050     {
00051         if( !$this->_collection && $this->getProductId() ) {
00052 
00053             $model = Mage::getModel('tag/tag');
00054             $this->_collection = $model->getResourceCollection()
00055                 ->addPopularity()
00056                 ->addStatusFilter($model->getApprovedStatus())
00057                 ->addProductFilter($this->getProductId())
00058                 ->addStoreFilter(Mage::app()->getStore()->getId())
00059                 ->setActiveFilter()
00060                 ->load();
00061         }
00062         return $this->_collection;
00063     }

getCount (  ) 

Definition at line 31 of file List.php.

00032     {
00033         return count($this->getTags());
00034     }

getFormAction (  ) 

Definition at line 74 of file List.php.

00075     {
00076         return Mage::getUrl('tag/index/save', array(
00077             'product' => $this->getProductId(),
00078             Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => Mage::helper('core/url')->getEncodedUrl()
00079         ));
00080     }

getProductId (  ) 

Definition at line 41 of file List.php.

00042     {
00043         if ($product = Mage::registry('current_product')) {
00044             return $product->getId();
00045         }
00046         return false;
00047     }

getTags (  ) 

Definition at line 36 of file List.php.

00037     {
00038         return $this->_getCollection()->getItems();
00039     }


Member Data Documentation

$_collection [protected]

Definition at line 29 of file List.php.


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

Generated on Sat Jul 4 17:24:53 2009 for Magento by  doxygen 1.5.8