oxwrating.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class oxwRating extends oxWidget
00008 {
00009 
00017     protected $_aComponentNames = array('oxcmp_user' => 1);
00018 
00024     protected $_sThisTemplate = 'widget/reviews/rating.tpl';
00025 
00031     protected $_dRatingValue = null;
00032 
00038     protected $_iRatingCnt = null;
00039 
00040 
00047     public function render()
00048     {
00049         parent::render();
00050 
00051         return $this->_sThisTemplate;
00052     }
00053 
00059     public function getRatingValue()
00060     {
00061         if ($this->_dRatingValue === null) {
00062             $this->_dRatingValue = (double) 0;
00063             $dValue = $this->getViewParameter("dRatingValue");
00064             if ($dValue) {
00065                 $this->_dRatingValue = round($dValue, 1);
00066             }
00067         }
00068 
00069         return (double) $this->_dRatingValue;
00070     }
00071 
00077     public function getRatingCount()
00078     {
00079         return $dCount = $this->getViewParameter("dRatingCount");
00080     }
00081 
00087     public function getRateUrl()
00088     {
00089         return $this->getViewParameter("sRateUrl");
00090     }
00091 
00097     public function canRate()
00098     {
00099         return $this->getViewParameter("blCanRate");
00100     }
00101 
00107     public function getArticleNId()
00108     {
00109         return $this->getViewParameter('anid');
00110     }
00111 }