interface SearchApiSortsManagerInterface in Search API sorts 8
Defines the interface for the search api sort manager.
Hierarchy
- interface \Drupal\search_api_sorts\SearchApiSortsManagerInterface
Expanded class hierarchy of SearchApiSortsManagerInterface
All classes that implement SearchApiSortsManagerInterface
1 file declares its use of SearchApiSortsManagerInterface
- SearchApiSortsQueryPreExecute.php in src/
EventSubscriber/ SearchApiSortsQueryPreExecute.php
File
- src/
SearchApiSortsManagerInterface.php, line 11
Namespace
Drupal\search_api_sortsView source
interface SearchApiSortsManagerInterface {
/**
* Returns the active sort field and order for a given search api display.
*
* @param \Drupal\search_api\Display\DisplayInterface $display
* The display where the active sort should be returned for.
*
* @return \Drupal\search_api_sorts\SortsField
* An object containing the field and order.
*/
public function getActiveSort(DisplayInterface $display);
/**
* Returns the default sort field and order.
*
* @param \Drupal\search_api\Display\DisplayInterface $display
* The display where the default sort should be returned for.
*
* @return \Drupal\search_api_sorts\SortsField
* An object containing the field and order.
*/
public function getDefaultSort(DisplayInterface $display);
/**
* Returns all enabled sort fields for a given search api display.
*
* @param \Drupal\search_api\Display\DisplayInterface $display
* The display where the enabled sorts should be returned for.
*
* @return \Drupal\search_api_sorts\Entity\SearchApiSortsField[]
* An array of sort field entities.
*/
public function getEnabledSorts(DisplayInterface $display);
/**
* Remove all deleted sorts for the given index.
*
* @param \Drupal\search_api\IndexInterface $index
* The search api index.
*/
public function cleanupSortFields(IndexInterface $index);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchApiSortsManagerInterface:: |
public | function | Remove all deleted sorts for the given index. | 1 |
SearchApiSortsManagerInterface:: |
public | function | Returns the active sort field and order for a given search api display. | 1 |
SearchApiSortsManagerInterface:: |
public | function | Returns the default sort field and order. | 1 |
SearchApiSortsManagerInterface:: |
public | function | Returns all enabled sort fields for a given search api display. | 1 |