You are here

public function SearchApiElasticsearchBackend::getOption in Elasticsearch Connector 8

Helper function. Return a server option.

3 calls to SearchApiElasticsearchBackend::getOption()
SearchApiElasticsearchBackend::getCluster in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Get the configured cluster; if the cluster is blank, use the default.
SearchApiElasticsearchBackend::getFacetLimit in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Helper function that return facet limits.
SearchApiElasticsearchBackend::viewSettingElement in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Helper function. Display a setting element.

File

src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php, line 305
Contains the SearchApiElasticsearchBackend object.

Class

SearchApiElasticsearchBackend
Plugin annotation @SearchApiBackend( id = "elasticsearch", label = @Translation("Elasticsearch"), description = @Translation("Index items using an Elasticsearch server.") )

Namespace

Drupal\elasticsearch_connector\Plugin\search_api\backend

Code

public function getOption($option, $default = NULL) {
  $options = $this
    ->getOptions();
  return isset($options->{$option}) ? $options->option : $default;
}