Handler
extends AbstractPlugin
in package
implements
SearchPlugin, ContentSearchIndex
Implement customer search handler This class provides interfaces for custom customer search handling
Tags
Interfaces, Classes, Traits and Enums
- SearchPlugin
- Define a system search plugin
- ContentSearchIndex
Table of Contents
- $name : string
- $path : string
- __construct() : mixed
- BuildEntry() : object
- Build entry
- DoSearch() : Result
- Do search for customers
- OnAddOrUpdateContent() : void
- Hook on content creation or modification
- OnCommandLineInterfaceCall() : void
- OnDeleteContent() : void
- Hook on delete a content
- OnIndex() : void
- OnNewIndex() : void
- OnSyncronize() : void
- RegisterHooks() : mixed
- SetupTemplate() : mixed
- _setupTemplate() : Result
Properties
$name
protected
string
$name
= ''
$path
protected
string
$path
= ''
Methods
__construct()
public
__construct() : mixed
Return values
mixed —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 of type customer
DoSearch()
Do search for customers
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
OnAddOrUpdateContent()
Hook on content creation or modification
public
OnAddOrUpdateContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnCommandLineInterfaceCall()
public
OnCommandLineInterfaceCall(HookArgument $param) : void
Parameters
- $param : HookArgument
Return values
void —OnDeleteContent()
Hook on delete a content
public
OnDeleteContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnIndex()
public
OnIndex(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnNewIndex()
public
OnNewIndex(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnSyncronize()
public
OnSyncronize(HookArgument $reference[, bool $is_full = false ]) : void
Parameters
- $reference : HookArgument
- $is_full : bool = false
Tags
Return values
void —RegisterHooks()
public
RegisterHooks() : mixed
Tags
Return values
mixed —SetupTemplate()
public
SetupTemplate([mixed $data = null ]) : mixed
Parameters
- $data : mixed = null
Tags
Return values
mixed —_setupTemplate()
protected
_setupTemplate([mixed $data = null ]) : Result
Parameters
- $data : mixed = null