You are here

function _elasticsearch_ec_index_ajax in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.7 elasticsearch_connector.module \_elasticsearch_ec_index_ajax()
  2. 8.2 elasticsearch_connector.module \_elasticsearch_ec_index_ajax()
  3. 8.5 elasticsearch_connector.module \_elasticsearch_ec_index_ajax()
  4. 8.6 elasticsearch_connector.module \_elasticsearch_ec_index_ajax()

Ajax callback for the ec_index element.

_state

Parameters

array $form:

1 string reference to '_elasticsearch_ec_index_ajax'
_elasticsearch_ec_index_process in ./elasticsearch_connector.module
Build two drop downs, one for the cluster and one for the indices.

File

./elasticsearch_connector.module, line 356
Provides hook implementations and functions accessible from other modules.

Code

function _elasticsearch_ec_index_ajax(array $form, array $form_state) {
  $parents = $form_state['triggering_element']['#parents'];
  $search_key = array_search('cluster_id', $parents);
  $parents[$search_key] = 'index';
  $index_element = drupal_array_get_nested_value($form, $parents);
  return $index_element;
}