/** * Adds store filter into array * * @access public * @param mixed $storeId * @param bool $withAdmin * @return Iou_UltimatePopUp_Model_Resource_Popup_Comment_Popup_Collection * @author Ultimate Module Creator */ public function addStoreFilter($storeId = null, $withAdmin = true) { if (is_null($storeId)) { $storeId = $this->getStoreId(); } parent::addStoreFilter($storeId, $withAdmin); if (!is_array($storeId)) { $storeId = array($storeId); } if (!empty($this->_storesIds)) { $this->_storesIds = array_intersect($this->_storesIds, $storeId); } else { $this->_storesIds = $storeId; } return $this; }
/** * filter store column * * @access protected * @param Iou_UltimatePopUp_Model_Resource_Popup_Collection $collection * @param Mage_Adminhtml_Block_Widget_Grid_Column $column * @return Iou_UltimatePopUp_Block_Adminhtml_Popup_Grid * @author Ultimate Module Creator */ protected function _filterStoreCondition($collection, $column) { if (!($value = $column->getFilter()->getValue())) { return; } $collection->addStoreFilter($value); return $this; }