function _elasticsearch_connector_check_if_index_locked in Elasticsearch Connector 7.2
Same name and namespace in other branches
- 7.5 elasticsearch_connector.module \_elasticsearch_connector_check_if_index_locked()
- 7 elasticsearch_connector.module \_elasticsearch_connector_check_if_index_locked()
Check if some of the modules locked a major changes on the cluster settings and deletion.
Parameters
string $cluster:
Return value
array
1 call to _elasticsearch_connector_check_if_index_locked()
- elasticsearch_connector_cluster_indices_delete in ./
elasticsearch_connector.admin.inc - Form constructor for the index deletion confirmation form.
File
- ./
elasticsearch_connector.module, line 290 - This module provide an interface to connecting to the elasticsearch cluster and implementing the official Elasticsearch library.
Code
function _elasticsearch_connector_check_if_index_locked($cluster, $index) {
$locked = array();
if (!empty($cluster)) {
$type = 'index';
foreach (module_implements('elasticsearch_connector_edit_lock') as $module) {
$function = $module . '_elasticsearch_connector_edit_lock';
$locked_result = $function($type, $cluster, $index);
if (!empty($locked_result)) {
$locked[] = $module;
}
}
}
return $locked;
}