You are here

public static function Cluster::getDefaultCluster in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Cluster.php \Drupal\elasticsearch_connector\Entity\Cluster::getDefaultCluster()

Get the default (cluster) used for elasticsearch.

Return value

string

8 calls to Cluster::getDefaultCluster()
Cluster::getClientById in src/Entity/Cluster.php
Return the cluster object based on Cluster ID.
ClusterDeleteForm::submitForm in src/Form/ClusterDeleteForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
ClusterForm::buildEntityForm in src/Form/ClusterForm.php
ClusterForm::validateForm in src/Form/ClusterForm.php
Form validation handler.
IndexForm::buildEntityForm in src/Form/IndexForm.php

... See full list

File

src/Entity/Cluster.php, line 116
Contains \Drupal\elasticsearch_connector\Entity\Cluster.

Class

Cluster
Defines the search server configuration entity.

Namespace

Drupal\elasticsearch_connector\Entity

Code

public static function getDefaultCluster() {
  return \Drupal::state()
    ->get('elasticsearch_connector_get_default_connector', '');
}