Esempio n. 1
0
 /**
  * Index url
  *
  * @param \Mirasvit\Search\Model\Index $index
  *
  * @return string
  */
 public function getIndexUrl($index)
 {
     $query = ['index' => $index->getId(), 'p' => null];
     if ($index->hasData('store_id') && $index->getData('store_id') != $this->getCurrentStore()->getId()) {
         return $this->getUrl('stores/store/switch', ['_query' => ['___store' => $index->getData('store_code')]]);
     }
     $params = ['_current' => true, '_query' => $query];
     if ($index->hasData('store_id')) {
         $params['_scope'] = $index->getData('store_id');
     }
     return $this->getUrl('*/*/*', $params);
 }