\FAQPage_Controller
Synopsis
class FAQPage_Controller
extends Page_Controller
{
- // members
- private static array $allowed_actions = ;
- public static integer $results_per_page = 10;
- public static string $search_term_key = 'q';
- public static string $search_category_key = 'c';
- public static string $search_results_summary_current_page_key = '%CurrentPage%';
- public static string $search_results_summary_total_pages_key = '%TotalPages%';
- public static string $search_results_summary_query_key = '%Query%';
- public static string $search_index_class = 'FAQSearchIndex';
- public static array $classes_to_search = ;
- // methods
- public void index()
- public array|SS_HTTPResponse view()
- public HTMLText search()
- protected SearchQuery getSearchQuery()
- public FAQSearchIndex doSearch()
- protected HTMLText parseSearchResults()
- protected void renderSearch()
- protected string makeQueryLink()
- public array getSelectedIDs()
- protected ArrayList getCategoriesForTemplate()
- public ArrayList SelectorCategories()
- public string SearchTermKey()
- public string SearchCategoryKey()
- public string CategoriesSelectAllText()
- public void SearchFieldPlaceholder()
- public void SearchButtonText()
- public void NoResultsMessage()
- public void SearchResultsTitle()
- public void SearchResultMoreLink()
Hierarchy
Extends
- Page_Controller
Members
private
- $allowed_actions
public
- $classes_to_search
- $results_per_page
—
int
How many search results should be shown per-page? - $search_category_key
- $search_index_class
—
string
SOLR configuration - $search_results_summary_current_page_key
- $search_results_summary_query_key
- $search_results_summary_total_pages_key
- $search_term_key
—
string
This is the string used for the url search term variable.
Methods
protected
- getCategoriesForTemplate() — Deep recursion of category taxonomy terms. Builds array of categories for template.
- getSearchQuery() — Builds a search query from a give search term.
- makeQueryLink() — Makes a query link for the current page from a search term Returns a URL with an empty search term if no query is passed
- parseSearchResults() — Renders the search template from a given Solr search result, suggestion and search term.
- renderSearch() — Sets a template and displays data
public
- CategoriesSelectAllText() — Translators
- NoResultsMessage()
- SearchButtonText()
- SearchCategoryKey()
- SearchFieldPlaceholder()
- SearchResultMoreLink()
- SearchResultsTitle()
- SearchTermKey()
- SelectorCategories() — Expose variables to the template.
- doSearch() — Performs a search against the configured Solr index from a given query, start and limit.
- getSelectedIDs() — Deep recursion of a category taxonomy term and its children. Builds array of categoriy IDs for searching.
- index()
- search() — Search function. Called from index() if we have a search term.
- view() — Render individual view for FAQ