/** * Adds store filter into array * * @param int|int[] $storeId * @return $this */ public function addStoreFilter($storeId = null) { if (null === $storeId) { $storeId = $this->getStoreId(); } parent::addStoreFilter($storeId); if (!is_array($storeId)) { $storeId = [$storeId]; } if (!empty($this->_storesIds)) { $this->_storesIds = array_intersect($this->_storesIds, $storeId); } else { $this->_storesIds = $storeId; } return $this; }