public function SearchApiSolrAcquiaConnector::defaultConfiguration in Acquia Search 3.x
Same name and namespace in other branches
- 2.x src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php \Drupal\acquia_search\Plugin\SolrConnector\SearchApiSolrAcquiaConnector::defaultConfiguration()
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides SolrConnectorPluginBase::defaultConfiguration
File
- src/
Plugin/ SolrConnector/ SearchApiSolrAcquiaConnector.php, line 98
Class
- SearchApiSolrAcquiaConnector
- Class SearchApiSolrAcquiaConnector.
Namespace
Drupal\acquia_search\Plugin\SolrConnectorCode
public function defaultConfiguration() {
$configuration = parent::defaultConfiguration();
unset($configuration['overridden_by_acquia_search']);
// The Acquia Search Solr isn't configured.
if (!Storage::getIdentifier()) {
return [];
}
$preferred_core_service = Runtime::getPreferredSearchCoreService();
if ($preferred_core_service
->isPreferredCoreAvailable()) {
$configuration = $this
->setPreferredCore($configuration, $preferred_core_service);
return $configuration;
}
return $configuration;
}