search_api_elasticsearch.install in Search API Elasticsearch 7.2
Same filename and directory in other branches
Install/Uninstall/Update tasks for the Search API Elasticsearch module.
File
search_api_elasticsearch.installView 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
Name | Description |
---|---|
search_api_elasticsearch_requirements | Implements hook_requirements(). |