Sunnysideup\SearchSimpleSmart\Abstractions\SearchEngineSortByDescriptor
Synopsis
class SearchEngineSortByDescriptor
{
- // members
- protected boolean $debug = false;
- protected array $debugArray = ;
- private static array $class_groups = ;
- private static array $class_group_limits = ;
- // methods
- public void __construct()
- public abstract string getShortTitle()
- public abstract string getDescription()
- public abstract array|null getSqlSortArray()
- public boolean hasCustomSort()
- public abstract SS_List doCustomSort()
- public string getDebugArray()
- protected DataList makeClassGroups()
- protected void hasClassGroups()
- protected void hasNoClassGroups()
Hierarchy
Uses
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Members
private
- $class_group_limits
—
array
set the total number of results per class_group e.g. - $class_groups
—
array
this is a metasorter, allowing you to always put some classes on top or at the bottom e.g. always put Product Pages at the top.
protected
- $debug
- $debugArray
—
array
retains debug information if turned on.
Methods
protected
public
- __construct()
- doCustomSort() — Do any custom sorting
- getDebugArray()
- getDescription() — returns the description - e.g. "sort by the last Edited date"
- getShortTitle() — returns the name - e.g. "Date", "Relevance"
- getSqlSortArray() — returns the sort statement that is addeded to search query prior to searching the SearchEngineDataObjects
- hasCustomSort() — Do we need to do custom sorting?