コード例 #1
0
 /**
  * Define if engine is available
  *
  * @return bool
  */
 public function test()
 {
     if (!$this->_helper->isEnabled()) {
         return parent::test();
     }
     return $this->_helper->getApplicationID() && $this->_helper->getAPIKey() && $this->_helper->getSearchOnlyAPIKey();
 }
コード例 #2
0
 /**
  * Rebuild index for the specified products
  *
  * @param null|int       $storeId
  * @param null|int|array $productIds
  * @return Algolia_Algoliasearch_Model_Resource_Fulltext
  */
 public function rebuildProductIndex($storeId = NULL, $productIds = NULL)
 {
     if ($this->_helper->isEnabled($storeId) && is_object($this->_engine) && is_callable(array($this->_engine, 'rebuildProductIndex'))) {
         $this->_engine->rebuildProductIndex($storeId, $productIds);
     }
     return $this;
 }