Example #1
0
 /**
  * {@inheritdoc}
  */
 protected function _prepareCollection()
 {
     $this->_collection = $this->_queriesFactory->create();
     if ($this->getRequest()->getParam('store')) {
         $storeIds = $this->getRequest()->getParam('store');
     } elseif ($this->getRequest()->getParam('website')) {
         $storeIds = $this->_storeManager->getWebsite($this->getRequest()->getParam('website'))->getStoreIds();
     } elseif ($this->getRequest()->getParam('group')) {
         $storeIds = $this->_storeManager->getGroup($this->getRequest()->getParam('group'))->getStoreIds();
     } else {
         $storeIds = '';
     }
     $this->_collection->setPopularQueryFilter($storeIds);
     $this->setCollection($this->_collection);
     return parent::_prepareCollection();
 }