You are here

function search_api_algolia_requirements in Search API Algolia 8

Same name and namespace in other branches
  1. 3.0.x 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 11
Install file.

Code

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