You are here

search_api_algolia.install in Search API Algolia 8

Same filename and directory in other branches
  1. 3.0.x search_api_algolia.install
  2. 2.0.x search_api_algolia.install

Install file.

File

search_api_algolia.install
View source
<?php

/**
 * @file
 * Install file.
 */

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

Functions