protected function buildWhere() { parent::buildWhere(); $this->_selectBuilder->where->add('c.'.Pap_Db_Table_Campaigns::STATUS, 'IN', array(Pap_Db_Campaign::CAMPAIGN_STATUS_ACTIVE, Pap_Db_Campaign::CAMPAIGN_STATUS_STOPPED)); $this->_selectBuilder->where->add('b.'.Pap_Db_Table_Banners::STATUS, '=', Pap_Db_Banner::STATUS_ACTIVE); if ($bannerSize = $this->getValueFromFilter('bannerSize')) { $this->_selectBuilder->where->add('SUBSTRING(b.'.Pap_Db_Table_Banners::SIZE.',2)', '=', $bannerSize); } if ($this->getShowOnlyWithStatsFromFilter()) { $statsCondition = new Gpf_SqlBuilder_CompoundWhereCondition(); $statsCondition->add('im.raw', '>', 0, 'OR'); $statsCondition->add('cl.raw', '>', 0, 'OR'); $statsCondition->add('tr.count', '>', 0, 'OR'); $this->_selectBuilder->where->addCondition($statsCondition); } Gpf_Plugins_Engine::extensionPoint('PostAffiliate.BannersGrid.buildWhere', $this->_selectBuilder); }
protected function buildWhere() { parent::buildWhere(); Gpf_Plugins_Engine::extensionPoint('AffiliateNetwork.modifyWhere', new Gpf_Common_SelectBuilderCompoundRecord($this->_selectBuilder, new Gpf_Data_Record(array('columnPrefix'), array('b')))); }