SearchPlugin
extends
SearchBuildEntry, Plugin
in
Define a system search plugin
Tags
Table of Contents
- BuildEntry() : object
- Build entry
- DoSearch() : Result
- Do search
- RegisterHooks() : array<string|int, mixed>
- Register system hooks
- SetupTemplate() : Result
- Get and set the plugin setup template form
Methods
BuildEntry()
Build entry
public
BuildEntry(object $doc[, string|null $language = null ][, array<string|int, mixed>|null $extra = null ]) : object
Convert the search result to frontend object row
Parameters
- $doc : object
-
The search response
- $language : string|null = null
-
The request language
- $extra : array<string|int, mixed>|null = null
-
Additional fields
Return values
object —A result object
DoSearch()
Do search
public
DoSearch(string|null $language, array<string|int, mixed> $payload) : Result
Execute the search by given arguments
Parameters
- $language : string|null
-
The language to search in
- $payload : array<string|int, mixed>
-
The search request
Return values
Result —A system result
RegisterHooks()
Register system hooks
public
RegisterHooks() : array<string|int, mixed>
Register a set of handler functions to be called in certain positions.
Return values
array<string|int, mixed> —A list of hooks to register
SetupTemplate()
Get and set the plugin setup template form
public
SetupTemplate([array<string|int, mixed>|null $data = null ]) : Result
Parameters
- $data : array<string|int, mixed>|null = null