You are here

public function SearchApiGlossaryAZHelper::glossaryGetter in Search API AZ Glossary 8

Same name and namespace in other branches
  1. 8.2 src/SearchApiGlossaryAZHelper.php \Drupal\search_api_glossary\SearchApiGlossaryAZHelper::glossaryGetter()

Getter callback for title_az_glossary property.

1 call to SearchApiGlossaryAZHelper::glossaryGetter()
SearchApiGlossaryAZProcessor::addFieldValues in src/Plugin/search_api/processor/SearchApiGlossaryAZProcessor.php
Adds the values of properties defined by this processor to the item.

File

src/SearchApiGlossaryAZHelper.php, line 20
Contains Drupal\search_api_glossary\SearchApiGlossaryAZHelper.

Class

SearchApiGlossaryAZHelper
Search Api GlossaryAZ Helper class.

Namespace

Drupal\search_api_glossary

Code

public function glossaryGetter($source_value, $glossary_az_grouping) {
  $first_letter = strtoupper(substr(trim($source_value), 0, 1));
  return self::glossaryGetterHelper($first_letter, array_values($glossary_az_grouping));
}