You are here

public function SearchPluginBase::getGroupLabel in Search API Autocomplete 8

Retrieves a group label for this search.

Used to group searches from the same source together in the UI.

Return value

string A translated, human-readable label to group the search by.

Overrides SearchPluginInterface::getGroupLabel

File

src/Search/SearchPluginBase.php, line 84

Class

SearchPluginBase
Provides a base class for search plugins.

Namespace

Drupal\search_api_autocomplete\Search

Code

public function getGroupLabel() {
  $plugin_definition = $this
    ->getPluginDefinition();
  if (isset($plugin_definition['group_label'])) {
    return $plugin_definition['group_label'];
  }
  return $this
    ->t('Other searches');
}