Mage_Review_Block_Customer_Recent Class Reference

Inheritance diagram for Mage_Review_Block_Customer_Recent:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 count ()
 getCollection ()
 getReviewLink ()
 getProductLink ()
 dateFormat ($date)
 getAllReviewsUrl ()
 getReviewUrl ($id)

Protected Member Functions

 _getCollection ()


Detailed Description

Definition at line 35 of file Recent.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 37 of file Recent.php.

00038     {
00039         parent::__construct();
00040         $this->setTemplate('review/customer/list.phtml');
00041 
00042         $this->_collection = Mage::getModel('review/review')->getProductCollection();
00043 
00044         $this->_collection
00045             ->addStoreFilter(Mage::app()->getStore()->getId())
00046             ->addCustomerFilter(Mage::getSingleton('customer/session')->getCustomerId())
00047             ->setDateOrder()
00048             ->setPageSize(5)
00049             ->load()
00050             ->addReviewSummary();
00051     }


Member Function Documentation

_getCollection (  )  [protected]

Definition at line 58 of file Recent.php.

00059     {
00060         return $this->_collection;
00061     }

count (  ) 

Definition at line 53 of file Recent.php.

00054     {
00055         return $this->_collection->getSize();
00056     }

dateFormat ( date  ) 

Definition at line 78 of file Recent.php.

00079     {
00080         return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
00081     }

getAllReviewsUrl (  ) 

Definition at line 83 of file Recent.php.

00084     {
00085         return Mage::getUrl('review/customer');
00086     }

getCollection (  ) 

Definition at line 63 of file Recent.php.

00064     {
00065         return $this->_getCollection();
00066     }

getProductLink (  ) 

Definition at line 73 of file Recent.php.

00074     {
00075         return Mage::getUrl('catalog/product/view/');
00076     }

getReviewLink (  ) 

Definition at line 68 of file Recent.php.

00069     {
00070         return Mage::getUrl('review/customer/view/');
00071     }

getReviewUrl ( id  ) 

Definition at line 88 of file Recent.php.

00089     {
00090         return Mage::getUrl('review/customer/view', array('id' => $id));
00091     }


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