protected function IndexForm::getClusterField in Elasticsearch Connector 8
Same name and namespace in other branches
- 8.7 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getClusterField()
 - 8.2 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getClusterField()
 - 8.5 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getClusterField()
 - 8.6 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::getClusterField()
 
Get cluster field.
Parameters
string $field: Field name.
Return value
array All clusters' fields.
1 call to IndexForm::getClusterField()
- IndexForm::buildEntityForm in src/
Form/ IndexForm.php  
File
- src/
Form/ IndexForm.php, line 96  - Contains \Drupal\elasticsearch_connector\Form\IndexForm.
 
Class
- IndexForm
 - Form controller for node type forms.
 
Namespace
Drupal\elasticsearch_connector\FormCode
protected function getClusterField($field) {
  $clusters = $this
    ->getAllClusters();
  $options = array();
  foreach ($clusters as $cluster) {
    $options[$cluster->{$field}] = $cluster->{$field};
  }
  return $options;
}