ilateral\SilverStripe\Searchable\Searchable
Synopsis
class Searchable
extends ViewableData
{
- // constants
- const DEFAULT_SORT = 'SearchableRelevance';
- const DEFAULT_ORDER = "DESC";
- // members
- private static array $objects = ;
- private static integer $page_length = 10;
- private static integer $dashboard_items = 5;
- private static array $custom_filters = ;
- private static string $template_class = SearchResults::class;
- // methods
- public static void add()
- public static SS_List findResults()
- public static SS_List Results()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Constants
Name | Value |
---|---|
DEFAULT_SORT | 'SearchableRelevance' |
DEFAULT_ORDER | "DESC" |
Members
private
- $custom_filters
—
array
Specify a list of custom filters that can be associated against an object we are searching. - $dashboard_items
—
int
Specify how many items should appear per object on the results dashboard. - $objects
—
array
Cache of objects added via Searchable::add. This is used to determine if the SearchForm is usable - $page_length
—
int
Specify how many items should appear per page of results. - $template_class — string
Methods
public
- Results()
- add() — Add an object to the Searchable module, this object will automatically be added to the results page dashboard
- findResults() — Return DataList of the results using $_REQUEST to get search info Wraps around {@link searchEngine()}.