Handler
in package
implements
SearchPlugin, ContentSearchIndex
Implement user search handler
This class provides interfaces for custom user search handling And some other functions for form loading
Tags
Interfaces, Classes, Traits and Enums
- SearchPlugin
- Define a system search plugin
- ContentSearchIndex
Table of Contents
- $multi_threads : int
- $user_config : object|null
- __construct() : mixed
- BasketChangeStatus() : void
- Called on basket status change, reaction is needed on cancel
- BuildEntry() : object
- Build entry user/address
- DoAddressSearch() : Result
- Search by addresses
- DoSearch() : Result
- Do search
- OnAddOrUpdateContent() : void
- Update search index of user and user addresses
- OnAfterWidgetConfigSave() : void
- OnCommandLineInterfaceCall() : void
- Cli to recreate a whole set of vimeo assets
- OnDeleteContent() : void
- Hook on delete a content
- OnExtractAttributeOptions() : void
- Get options for user tags This method is cached
- OnGetEntityAttributes() : void
- OnGetSearchFieldsUser() : void
- OnIndex() : void
- OnLoadEntityFormPreset() : void
- OnMailGetReceiver() : void
- allow system to override the default receiver of an email
- OnNewIndex() : void
- OnSyncronize() : void
- RegisterHooks() : array<string|int, mixed>
- Register system hooks
- SetupTemplate() : mixed
- indexUserAddresses() : Result
Properties
$multi_threads
private
int
$multi_threads
= 3
$user_config
private
object|null
$user_config
= null
Methods
__construct()
public
__construct() : mixed
Return values
mixed —BasketChangeStatus()
Called on basket status change, reaction is needed on cancel
public
BasketChangeStatus( $req) : void
Parameters
Return values
void —BuildEntry()
Build entry user/address
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 address or, user
DoAddressSearch()
Search by addresses
public
DoAddressSearch(string|null $language, array<string|int, mixed> $payload) : Result
Parameters
- $language : string|null
- $payload : array<string|int, mixed>
Return values
Result —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
OnAddOrUpdateContent()
Update search index of user and user addresses
public
OnAddOrUpdateContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
-
HookArgument
Return values
void —OnAfterWidgetConfigSave()
public
OnAfterWidgetConfigSave(HookArgument $param) : void
Parameters
- $param : HookArgument
Return values
void —OnCommandLineInterfaceCall()
Cli to recreate a whole set of vimeo assets
public
OnCommandLineInterfaceCall( $param) : void
Parameters
Tags
Return values
void —OnDeleteContent()
Hook on delete a content
public
OnDeleteContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnExtractAttributeOptions()
Get options for user tags This method is cached
public
OnExtractAttributeOptions(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnGetEntityAttributes()
public
OnGetEntityAttributes(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnGetSearchFieldsUser()
public
OnGetSearchFieldsUser(HookArgument $param) : void
Parameters
- $param : HookArgument
Return values
void —OnIndex()
public
OnIndex(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Tags
Return values
void —OnLoadEntityFormPreset()
public
OnLoadEntityFormPreset(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnMailGetReceiver()
allow system to override the default receiver of an email
public
OnMailGetReceiver(HookArgument $reference) : void
Parameters
- $reference : HookArgument
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()
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 default system result set
SetupTemplate()
public
SetupTemplate([mixed $data = null ]) : mixed
Parameters
- $data : mixed = null
Return values
mixed —indexUserAddresses()
private
indexUserAddresses(User $user, Search $client[, bool $is_drop = false ][, bool $is_full = false ]) : Result
Parameters
- $user : User
- $client : Search
- $is_drop : bool = false
- $is_full : bool = false