You are here

function _elasticsearch_connector_check_if_cluster_locked in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 elasticsearch_connector.module \_elasticsearch_connector_check_if_cluster_locked()
  2. 7.2 elasticsearch_connector.module \_elasticsearch_connector_check_if_cluster_locked()

Check if some of the modules locked a major changes on the cluster settings and deletion. Invoke the hooks similar to the module_invoke.

Parameters

object $cluster:

Return value

array

1 call to _elasticsearch_connector_check_if_cluster_locked()
elasticsearch_connector_delete_cluster in ./elasticsearch_connector.admin.inc
Form constructor for the cluster deletion confirmation form.

File

./elasticsearch_connector.module, line 269
This module provide an interface to connecting to the elasticsearch cluster and implementing the official Elasticsearch library.

Code

function _elasticsearch_connector_check_if_cluster_locked($cluster) {
  $locked = array();
  if (!empty($cluster)) {
    $type = 'cluster';
    foreach (module_implements('elasticsearch_connector_edit_lock') as $module) {
      $function = $module . '_elasticsearch_connector_edit_lock';
      $locked_result = $function($type, $cluster, NULL);
      if (!empty($locked_result)) {
        $locked[] = $module;
      }
    }
  }
  return $locked;
}