/** * 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(); }
/** * 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; }