\CustomSearch
Extension to provide a search interface when applied to ContentController
Synopsis
class CustomSearch
extends Extension
{
- // members
- private static integer $items_per_page = 10;
- private static string $search_controller = 'SearchPage';
- private static array $allowed_actions = ;
- // methods
- public void SearchForm()
- public FieldList getSearchFields()
- public FieldList getSearchActions()
- public ContentController getControllerForSearchForm()
- public void getSearchResults()
- public void results()
- public static boolean isFulltextSupported()
Hierarchy
Extends
- Extension
Tasks
Line | Task |
---|---|
100 | throw notice |
Members
private
- $allowed_actions
- $items_per_page — int
- $search_controller
—
string
either 'this' for the current page (owner) or a page / controller, e.g. 'SearchPage'
Methods
public
- SearchForm() — Site search form
- getControllerForSearchForm()
- getSearchActions() — generates the actions of the SearchForm
- getSearchFields() — generates the fields for the SearchForm
- getSearchResults() — Process and render search results.
- isFulltextSupported() — Check if Fulltext search is supported
- results()