You are here

public static function Cluster::setDefaultCluster in Elasticsearch Connector 8

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

Set the default (cluster) used for elasticsearch.

Return value

string

1 call to Cluster::setDefaultCluster()
ClusterForm::validateForm in src/Form/ClusterForm.php
Form validation handler.

File

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

Class

Cluster
Defines the search server configuration entity.

Namespace

Drupal\elasticsearch_connector\Entity

Code

public static function setDefaultCluster($cluster_id) {
  return \Drupal::state()
    ->set('elasticsearch_connector_get_default_connector', $cluster_id);
}