/** * Apply custom filtering * * @return void */ protected function _renderFiltersBefore() { if (!$this->getLoadDefault()) { $this->getSelect()->where('main_table.website_id > ?', 0); } parent::_renderFiltersBefore(); }
/** * Join store relation table if there is store filter * * @param string $tableName * @param string $columnName * @return void */ protected function joinStoreRelationTable($tableName, $columnName) { if ($this->getFilter('store')) { $this->getSelect()->join(['store_table' => $this->getTable($tableName)], 'main_table.' . $columnName . ' = store_table.' . $columnName, [])->group('main_table.' . $columnName); } parent::_renderFiltersBefore(); }