public function SearchApiSolrAcquiaMultiSubsBackend::viewSettings in Acquia Search Multiple Indexes 8
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrAcquiaMultiSubsBackend.php, line 93
Class
- SearchApiSolrAcquiaMultiSubsBackend
- Plugin annotation @SearchApiBackend( id = "search_api_solr_acquia_multi_subs", label = @Translation("Acquia Solr Multi Sub"), description = @Translation("Index items using a specific Acquia Apache Solr search server.") )
Namespace
Drupal\acquia_search_multi_subs\Plugin\search_api\backendCode
public function viewSettings() {
$info = parent::viewSettings();
$auto_detection = isset($this->configuration['acquia_override_subscription']['acquia_override_auto_switch']) && $this->configuration['acquia_override_subscription']['acquia_override_auto_switch'];
$auto_detection_state = $auto_detection ? $this
->t('enabled') : $this
->t('disabled');
// Provide a detailed message about the environment the module is detecting.
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
$info_text = $this
->t('Auto detection of your environment is %state. Detected environment: :env, site name: :site_name.: ', array(
'%state' => $auto_detection_state,
':env' => $_ENV['AH_SITE_ENVIRONMENT'],
':site_name' => $_ENV['AH_SITE_NAME'],
));
}
else {
$info_text = $this
->t('Auto detection of your environment is %state. Detecting local environment.', array(
'%state' => $auto_detection_state,
));
}
$info[] = array(
'label' => $this
->t('Acquia Search Auto Detection'),
'info' => $info_text,
);
return $info;
}