You are here

public function ElasticsearchController::pageTitle in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.7 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  2. 8.2 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  3. 8.5 src/Controller/ElasticsearchController.php \Drupal\elasticsearch_connector\Controller\ElasticsearchController::pageTitle()
  4. 8.6 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.

1 string reference to 'ElasticsearchController::pageTitle'
elasticsearch_connector.routing.yml in ./elasticsearch_connector.routing.yml
elasticsearch_connector.routing.yml

File

src/Controller/ElasticsearchController.php, line 53
Contains \Drupal\elasticsearch_connector\Controller\ElasticsearchController.

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();
}