Example #1
0
 /**
  * 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 = array($storeId);
     }
     if (!empty($this->_storesIds)) {
         $this->_storesIds = array_intersect($this->_storesIds, $storeId);
     } else {
         $this->_storesIds = $storeId;
     }
     return $this;
 }