You are here

function _elasticsearch_ec_clusters_process in Elasticsearch Connector 8

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

Process the ec_cluster element type.

Parameters

array $element:

array $form_state:

array $form:

Return value

array $element

1 string reference to '_elasticsearch_ec_clusters_process'
elasticsearch_connector_element_info in ./elasticsearch_connector.module
Implements hook_element_info().

File

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

Code

function _elasticsearch_ec_clusters_process(array $element, array &$form_state, array $form) {
  $element = form_process_select($element);
  if (empty($element['#skip_default_options'])) {
    $element['#only_active'] = isset($element['#only_active']) ? $element['#only_active'] : TRUE;
    $element['#empty_option'] = isset($element['#empty_option']) ? $element['#empty_option'] : TRUE;
    $clusters = elasticsearch_cluster_load_all($element['#only_active'], $element['#empty_option']);
    $element['#options'] = $clusters;
  }
  return $element;
}