You are here

public function ElasticsearchController::pageTitle in Elasticsearch Connector 8.6

Same name and namespace in other branches
  1. 8.7 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  2. 8 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  3. 8.2 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  4. 8.5 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()

Page title callback for a cluster's "View" tab.

Parameters

\Drupal\elasticsearch_connector\Entity\Cluster $elasticsearch_cluster: The cluster that is displayed.

Return value

string The page title.

File

src/Controller/ElasticsearchController.php, line 78

Class

ElasticsearchController
Provides route responses for elasticsearch clusters.

Namespace

Drupal\elasticsearch_connector\Controller

Code

public function pageTitle(Cluster $elasticsearch_cluster) {

  // TODO: Check if we need string escaping.
  return $elasticsearch_cluster
    ->label();
}