public function SortProcessorInterface::sortResults in Facets 8
Orders results and return the new order of results.
Parameters
\Drupal\facets\Result\Result $a: First result which should be compared.
\Drupal\facets\Result\Result $b: Second result which should be compared.
Return value
int -1, 0, or 1 depending which result
5 methods override SortProcessorInterface::sortResults()
- ActiveWidgetOrderProcessor::sortResults in src/
Plugin/ facets/ processor/ ActiveWidgetOrderProcessor.php - Orders results and return the new order of results.
- CountWidgetOrderProcessor::sortResults in src/
Plugin/ facets/ processor/ CountWidgetOrderProcessor.php - Orders results and return the new order of results.
- DisplayValueWidgetOrderProcessor::sortResults in src/
Plugin/ facets/ processor/ DisplayValueWidgetOrderProcessor.php - Orders results and return the new order of results.
- RawValueWidgetOrderProcessor::sortResults in src/
Plugin/ facets/ processor/ RawValueWidgetOrderProcessor.php - Orders results and return the new order of results.
- TermWeightWidgetOrderProcessor::sortResults in src/
Plugin/ facets/ processor/ TermWeightWidgetOrderProcessor.php - Orders results and return the new order of results.
File
- src/
Processor/ SortProcessorInterface.php, line 23
Class
- SortProcessorInterface
- Processor runs before the renderable array is created.
Namespace
Drupal\facets\ProcessorCode
public function sortResults(Result $a, Result $b);