Public Member Functions | |
__construct () | |
getRating () | |
getRatingSummary () |
Definition at line 35 of file Summary.php.
__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 }
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 }