Mage_Review_Block_Customer_List Class Reference

Inheritance diagram for Mage_Review_Block_Customer_List:

Mage_Customer_Block_Account_Dashboard Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 count ()
 getToolbarHtml ()
 getCollection ()
 getReviewLink ()
 getProductLink ()
 dateFormat ($date)

Protected Member Functions

 _construct ()
 _prepareLayout ()
 _getCollection ()
 _beforeToHtml ()

Protected Attributes

 $_collection


Detailed Description

Definition at line 35 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 93 of file List.php.

00094     {
00095         $this->_getCollection()
00096             ->load()
00097             ->addReviewSummary();
00098         return parent::_beforeToHtml();
00099     }

_construct (  )  [protected]

Internal constructor, that is called from real constructor

Please override this one instead of overriding real __construct constructor

Please override this one instead of overriding real __construct constructor

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 40 of file List.php.

00041     {
00042         $this->_collection = Mage::getModel('review/review')->getProductCollection();
00043         $this->_collection
00044             ->addStoreFilter(Mage::app()->getStore()->getId())
00045             ->addCustomerFilter(Mage::getSingleton('customer/session')->getCustomerId())
00046             ->setDateOrder();
00047     }

_getCollection (  )  [protected]

Definition at line 68 of file List.php.

00069     {
00070         return $this->_collection;
00071     }

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 59 of file List.php.

00060     {
00061         $toolbar = $this->getLayout()->createBlock('page/html_pager', 'customer_review_list.toolbar')
00062             ->setCollection($this->_getCollection());
00063 
00064         $this->setChild('toolbar', $toolbar);
00065         return parent::_prepareLayout();
00066     }

count (  ) 

Definition at line 49 of file List.php.

00050     {
00051         return $this->_collection->getSize();
00052     }

dateFormat ( date  ) 

Definition at line 88 of file List.php.

00089     {
00090         return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
00091     }

getCollection (  ) 

Definition at line 73 of file List.php.

00074     {
00075         return $this->_getCollection();
00076     }

getProductLink (  ) 

Definition at line 83 of file List.php.

00084     {
00085         return Mage::getUrl('catalog/product/view/');
00086     }

getReviewLink (  ) 

Definition at line 78 of file List.php.

00079     {
00080         return Mage::getUrl('review/customer/view/');
00081     }

getToolbarHtml (  ) 

Definition at line 54 of file List.php.

00055     {
00056         return $this->getChildHtml('toolbar');
00057     }


Member Data Documentation

$_collection [protected]

Definition at line 38 of file List.php.


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

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