You are here

public function SolrConnectorPluginBase::getCoreLink in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getCoreLink()
  2. 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getCoreLink()
  3. 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::getCoreLink()

Returns a link to the Solr core, if the necessary options are set.

Return value

\Drupal\Core\Link

Overrides SolrConnectorInterface::getCoreLink

1 call to SolrConnectorPluginBase::getCoreLink()
StandardSolrCloudConnector::getCollectionLink in src/Plugin/SolrConnector/StandardSolrCloudConnector.php
Returns a link to the Solr collection, if the necessary options are set.

File

src/SolrConnector/SolrConnectorPluginBase.php, line 350

Class

SolrConnectorPluginBase
Defines a base class for Solr connector plugins.

Namespace

Drupal\search_api_solr\SolrConnector

Code

public function getCoreLink() {
  $url_path = $this
    ->getServerUri() . '#/' . $this->configuration['core'];
  $url = Url::fromUri($url_path);
  return Link::fromTextAndUrl($url_path, $url);
}