[ Index ]

PHP Cross Reference of DokuWiki




/inc/Ui/ -> Search.php (summary)

(no description)

File Size: 625 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Search:: (16 methods):

Class: Search  - X-Ref

__construct(array $pageLookupResults, array $fullTextResults, $highlight)   X-Ref
Search constructor.

param: array $pageLookupResults pagename lookup results in the form [pagename => pagetitle]
param: array $fullTextResults fulltext search results in the form [pagename => #hits]
param: array $highlight array of strings to be highlighted

show()   X-Ref
display the search result

return: void

getSearchFormHTML($query)   X-Ref
Get a form which can be used to adjust/refine the search

param: string $query
return: string

addSortTool(Form $searchForm)   X-Ref
Add elements to adjust how the results are sorted

param: Form $searchForm

isNamespaceAssistanceAvailable(array $parsedQuery)   X-Ref
Check if the query is simple enough to modify its namespace limitations without breaking the rest of the query

param: array $parsedQuery
return: bool

isFragmentAssistanceAvailable(array $parsedQuery)   X-Ref
Check if the query is simple enough to modify the fragment search behavior without breaking the rest of the query

param: array $parsedQuery
return: bool

addSearchAssistanceElements(Form $searchForm)   X-Ref
Add the elements to be used for search assistance

param: Form $searchForm

addFragmentBehaviorLinks(Form $searchForm)   X-Ref
Add the elements to adjust the fragment search behavior

param: Form $searchForm

addNamespaceSelector(Form $searchForm)   X-Ref
Add the elements for the namespace selector

param: Form $searchForm

getAdditionalNamespacesFromResults($baseNS)   X-Ref
Parse the full text results for their top namespaces below the given base namespace

param: string $baseNS the namespace within which was searched, empty string for root namespace
return: array an associative array with namespace => #number of found pages, sorted descending

addDateSelector(Form $searchForm)   X-Ref

param: Form $searchForm

getSearchIntroHTML($query)   X-Ref
Build the intro text for the search page

param: string $query the search query
return: string

createPagenameFromQuery($parsedQuery)   X-Ref
Create a pagename based the parsed search query

param: array $parsedQuery
return: string pagename constructed from the parsed query

getPageLookupHTML($data)   X-Ref
Build HTML for a list of pages with matching pagenames

param: array $data search results
return: string

getFulltextResultsHTML($data, $highlight)   X-Ref
Build HTML for fulltext search results or "no results" message

param: array $data the results of the fulltext search
param: array $highlight the terms to be highlighted in the results
return: string

restrictQueryToNSLink($ns)   X-Ref
create a link to restrict the current query to a namespace

param: false|string $ns the namespace to which to restrict the query
return: false|string