You are here

search_api_elasticsearch.install in Search API Elasticsearch 7.2

Same filename and directory in other branches
  1. 7 search_api_elasticsearch.install

Install/Uninstall/Update tasks for the Search API Elasticsearch module.

File

search_api_elasticsearch.install
View source
<?php

/**
 * @file
 * Install/Uninstall/Update tasks for the Search API Elasticsearch module.
 */

/**
 * Implements hook_requirements().
 */
function search_api_elasticsearch_requirements($phase) {
  $requirements = [];
  $t = get_t();
  if ($phase == 'runtime') {
    if (!class_exists('\\Elastica\\Client')) {
      $requirements['elastica'] = [
        'title' => $t('Elastica'),
        'description' => $t('Search API Elasticsearch requires the Elastica library (version 3.2.3) to be installed.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}

Functions