Mage_Adminhtml_Block_Review_Rating_Summary Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Review_Rating_Summary:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getRating ()
 getRatingSummary ()


Detailed Description

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

00038     {
00039         $this->setTemplate('rating/stars/summary.phtml');
00040         $this->setReviewId(Mage::registry('review_data')->getId());
00041     }


Member Function Documentation

getRating (  ) 

Definition at line 43 of file Summary.php.

00044     {
00045         if( !$this->getRatingCollection() ) {
00046             $ratingCollection = Mage::getModel('rating/rating_option_vote')
00047                 ->getResourceCollection()
00048                 ->setReviewFilter($this->getReviewId())
00049                 ->addRatingInfo()
00050                 ->load();
00051             $this->setRatingCollection( ( $ratingCollection->getSize() ) ? $ratingCollection : false );
00052         }
00053         return $this->getRatingCollection();
00054     }

getRatingSummary (  ) 

Definition at line 56 of file Summary.php.

00057     {
00058         if( !$this->getRatingSummaryCache() ) {
00059             $this->setRatingSummaryCache(Mage::getModel('rating/rating')->getReviewSummary($this->getReviewId()));
00060         }
00061 
00062         return $this->getRatingSummaryCache();
00063     }


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

Generated on Sat Jul 4 17:22:57 2009 for Magento by  doxygen 1.5.8