/** * Set order * * @param string $attribute * @param string $dir * @return Mage_Reports_Model_Resource_Review_Collection */ public function setOrder($attribute, $dir = self::SORT_ORDER_DESC) { if (in_array($attribute, array('nickname', 'title', 'detail', 'created_at'))) { $this->_select->order($attribute . ' ' . $dir); } else { parent::setOrder($attribute, $dir); } return $this; }
protected function _initSelect() { parent::_initSelect(); $this->getSelect()->join(array('rev_details' => $this->_reviewDetailTable), 'main_table.review_id = rev_details.review_id', array('review_reply')); return $this; }
/** * Init Select * * @return Mage_Reports_Model_Resource_Review_Customer_Collection */ protected function _initSelect() { parent::_initSelect(); $this->_joinCustomers(); return $this; }
/** * Load data * * @param boolean $printQuery * @param boolean $logQuery * @return Mage_Review_Model_Resource_Review_Collection */ public function load($printQuery = false, $logQuery = false) { if ($this->isLoaded()) { return $this; } Mage::dispatchEvent('review_review_collection_load_before', array('collection' => $this)); parent::load($printQuery, $logQuery); if ($this->_addStoreDataFlag) { $this->_addStoreData(); } return $this; }