You are here

protected function SearchApiSortsManager::getSorts in Search API sorts 8

Returns all sort fields for a given search api display.

Parameters

\Drupal\search_api\Display\DisplayInterface $display: The display where the sorts should be returned for.

Return value

\Drupal\Core\Entity\EntityInterface[] An array containing sort fields for the given search display/

1 call to SearchApiSortsManager::getSorts()
SearchApiSortsManager::cleanupSortFields in src/SearchApiSortsManager.php
Remove all deleted sorts for the given index.

File

src/SearchApiSortsManager.php, line 98

Class

SearchApiSortsManager
Manages search api sorts.

Namespace

Drupal\search_api_sorts

Code

protected function getSorts(DisplayInterface $display) {
  return $this->searchApiSortsFieldStorage
    ->loadByProperties([
    'display_id' => $this
      ->getEscapedConfigId($display
      ->getPluginId()),
  ]);
}