
Public Member Functions | |
| getTagInfo () | |
| getMyProducts () | |
| getCount () | |
| getReviewUrl ($productId) | |
| getToolbarHtml () | |
| getMode () | |
Protected Member Functions | |
| _construct () | |
| _prepareLayout () | |
| _getCollection () | |
Protected Attributes | |
| $_collection | |
| $_tagInfo | |
Definition at line 35 of file View.php.
| _construct | ( | ) | [protected] |
Initialize block
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 55 of file View.php.
00056 { 00057 parent::_construct(); 00058 $this->setTagId(Mage::registry('tagId')); 00059 }
| _getCollection | ( | ) | [protected] |
Retrieve Tagged product(s) collection
Definition at line 146 of file View.php.
00147 { 00148 if (is_null($this->_collection)) { 00149 $this->_collection = Mage::getModel('tag/tag') 00150 ->getEntityCollection() 00151 ->addTagFilter($this->getTagId()) 00152 ->addCustomerFilter(Mage::getSingleton('customer/session')->getCustomerId()) 00153 ->addStoreFilter(Mage::app()->getStore()->getId()) 00154 ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) 00155 ->setActiveFilter(); 00156 00157 Mage::getSingleton('catalog/product_status') 00158 ->addVisibleFilterToCollection($this->_collection); 00159 Mage::getSingleton('catalog/product_visibility') 00160 ->addVisibleInSiteFilterToCollection($this->_collection); 00161 } 00162 return $this->_collection; 00163 }
| _prepareLayout | ( | ) | [protected] |
Preparing block layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 111 of file View.php.
00112 { 00113 $toolbar = $this->getLayout() 00114 ->createBlock('page/html_pager', 'customer_tag_list.toolbar') 00115 ->setCollection($this->_getCollection()); 00116 00117 $this->setChild('toolbar', $toolbar); 00118 return parent::_prepareLayout(); 00119 }
| getCount | ( | ) |
Retrieve count of Tagged Product(s)
Definition at line 90 of file View.php.
00091 { 00092 return sizeof($this->getMyProducts()); 00093 }
| getMode | ( | ) |
| getMyProducts | ( | ) |
Retrieve Tagged Product Collection items
Definition at line 80 of file View.php.
00081 { 00082 return $this->_getCollection()->getItems(); 00083 }
| getReviewUrl | ( | $ | productId | ) |
Retrieve Product Info URL
| int | $productId |
Definition at line 101 of file View.php.
00102 { 00103 return Mage::getUrl('review/product/list', array('id' => $productId)); 00104 }
| getTagInfo | ( | ) |
Retrieve current Tag object
Definition at line 66 of file View.php.
00067 { 00068 if (is_null($this->_tagInfo)) { 00069 $this->_tagInfo = Mage::getModel('tag/tag') 00070 ->load($this->getTagId()); 00071 } 00072 return $this->_tagInfo; 00073 }
| getToolbarHtml | ( | ) |
Retrieve Toolbar block HTML
Definition at line 126 of file View.php.
00127 { 00128 return $this->getChildHtml('toolbar'); 00129 }
1.5.8