You are here

function search_api_algolia_requirements in Search API Algolia 3.0.x

Same name and namespace in other branches
  1. 8 search_api_algolia.install \search_api_algolia_requirements()
  2. 2.0.x search_api_algolia.install \search_api_algolia_requirements()

Implements hook_requirements().

File

./search_api_algolia.install, line 36
Install file.

Code

function search_api_algolia_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Algolia\\AlgoliaSearch\\Algolia')) {
      $requirements['search_api_algolia_library'] = [
        'description' => t('Algolia Search requires the algolia/algoliasearch-client-php library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}