public static function Cluster::loadAllClusters in Elasticsearch Connector 8
Same name and namespace in other branches
- 8.2 src/Entity/Cluster.php \Drupal\elasticsearch_connector\Entity\Cluster::loadAllClusters()
Load all clusters.
Parameters
bool $include_inactive:
Return value
\Drupal\elasticsearch_connector\Entity\Cluster[]
1 call to Cluster::loadAllClusters()
- SearchApiElasticsearchBackend::buildConfigurationForm in src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php - Overrides configurationForm().
File
- src/
Entity/ Cluster.php, line 204 - Contains \Drupal\elasticsearch_connector\Entity\Cluster.
Class
- Cluster
- Defines the search server configuration entity.
Namespace
Drupal\elasticsearch_connector\EntityCode
public static function loadAllClusters($include_inactive = TRUE) {
$clusters = self::loadMultiple();
foreach ($clusters as $cluster) {
if (!$include_inactive && !$cluster->status) {
unset($clusters[$cluster->cluster_id]);
}
}
return $clusters;
}