You are here

public function SearchApiSolrAcquiaConnector::viewSettings in Acquia Search 3.x

Same name and namespace in other branches
  1. 2.x src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php \Drupal\acquia_search\Plugin\SolrConnector\SearchApiSolrAcquiaConnector::viewSettings()

Returns additional, connector-specific information about this server.

This information will be then added to the server's "View" tab in some way. In the default theme implementation the data is output in a table with two columns along with other, generic information about the server.

Return value

array An array of additional server information, with each piece of information being an associative array with the following keys:

  • label: The human-readable label for this data.
  • info: The information, as HTML.
  • status: (optional) The status associated with this information. One of "info", "ok", "warning" or "error". Defaults to "info".

Overrides SolrConnectorPluginBase::viewSettings

File

src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php, line 455

Class

SearchApiSolrAcquiaConnector
Class SearchApiSolrAcquiaConnector.

Namespace

Drupal\acquia_search\Plugin\SolrConnector

Code

public function viewSettings() {
  $uri = Url::fromUri('https://www.acquia.com/products-services/acquia-search', [
    'absolute' => TRUE,
  ]);
  $link = Link::fromTextAndUrl($this
    ->t('Acquia Search'), $uri);
  $message = $this
    ->t('Search is provided by @acquia_search.', [
    '@acquia_search' => $link
      ->toString(),
  ]);
  \Drupal::messenger()
    ->addMessage($message);
  return parent::viewSettings();
}