00001 <?php 00002 00006 class oxwReview extends oxWidget 00007 { 00008 00016 protected $_aComponentNames = array('oxcmp_user' => 1); 00017 00023 protected $_sThisTemplate = 'widget/reviews/reviews.tpl'; 00024 00025 00032 public function render() 00033 { 00034 parent::render(); 00035 00036 return $this->_sThisTemplate; 00037 } 00038 00044 public function getReviewType() 00045 { 00046 return strtolower($this->getViewParameter('type')); 00047 } 00048 00054 public function getArticleId() 00055 { 00056 return $this->getViewParameter('aid'); 00057 } 00058 00064 public function getArticleNId() 00065 { 00066 return $this->getViewParameter('anid'); 00067 } 00068 00074 public function getRecommListId() 00075 { 00076 return $this->getViewParameter('recommid'); 00077 } 00078 00084 public function canRate() 00085 { 00086 return $this->getViewParameter('canrate'); 00087 } 00088 00094 public function getReviewUserHash() 00095 { 00096 return $this->getViewParameter('reviewuserhash'); 00097 } 00098 00104 public function getReviews() 00105 { 00106 $oReview = $this->getConfig()->getTopActiveView(); 00107 00108 return $oReview->getReviews(); 00109 } 00110 }