You are here

protected function IndexForm::getAllClusters in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.7 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getAllClusters()
  2. 8.2 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getAllClusters()
  3. 8.5 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getAllClusters()
  4. 8.6 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getAllClusters()

Get all clusters.

Return value

array All clusters

2 calls to IndexForm::getAllClusters()
IndexForm::getClusterField in src/Form/IndexForm.php
Get cluster field.
IndexForm::getSelectedClusterUrl in src/Form/IndexForm.php
Return url of the selected cluster.

File

src/Form/IndexForm.php, line 79
Contains \Drupal\elasticsearch_connector\Form\IndexForm.

Class

IndexForm
Form controller for node type forms.

Namespace

Drupal\elasticsearch_connector\Form

Code

protected function getAllClusters() {
  $options = array();
  foreach ($this
    ->getClusterStorage()
    ->loadMultiple() as $cluster_machine_name) {
    $options[$cluster_machine_name->cluster_id] = $cluster_machine_name;
  }
  return $options;
}