Algolia_Algoliasearch_Helper_Config::getAPIKey PHP Метод

getAPIKey() публичный Метод

public getAPIKey ( $storeId = null )
    public function getAPIKey($storeId = null)
    {
        /** @var Mage_Core_Helper_Data $coreHelper */
        $coreHelper = Mage::helper('core');
        $encrypted = trim(Mage::getStoreConfig(self::API_KEY, $storeId));
        return $coreHelper->decrypt($encrypted);
    }

Usage Example

 /**
  * Rebuild all index data.
  */
 public function reindexAll()
 {
     if (!$this->config->getApplicationID() || !$this->config->getAPIKey() || !$this->config->getSearchOnlyAPIKey()) {
         /** @var Mage_Adminhtml_Model_Session $session */
         $session = Mage::getSingleton('adminhtml/session');
         $session->addError('Algolia reindexing failed: You need to configure your Algolia credentials in System > Configuration > Algolia Search.');
         return;
     }
     $this->queue->runCron();
     return $this;
 }
All Usage Examples Of Algolia_Algoliasearch_Helper_Config::getAPIKey