Handler
in package
implements
SearchPlugin, ContentSearchIndex
Implement employee search handler
This class provides interfaces for custom service search handling
Tags
Interfaces, Classes, Traits and Enums
- SearchPlugin
- Define a system search plugin
- ContentSearchIndex
Table of Contents
- $dbal : CalendarDBAL|null
- BuildEntry() : object
- Build entry
- DoSearch() : Result
- Do search for employees
- OnAddOrUpdateContent() : void
- Hook on content creation or modification
- OnBeforeAddOrUpdateContent() : void
- OnDeleteContent() : void
- Hook on delete a content
- OnIndex() : void
- OnNewIndex() : void
- OnSyncronize() : void
- RegisterHooks() : mixed
- SetupTemplate() : mixed
- database() : CalendarDBAL|null
- Get the database instance
Properties
$dbal
private
CalendarDBAL|null
$dbal
= null
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 of type employee
DoSearch()
Do search for employees
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
-
A hook argument
Return values
void —OnBeforeAddOrUpdateContent()
public
OnBeforeAddOrUpdateContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnDeleteContent()
Hook on delete a content
public
OnDeleteContent(HookArgument $reference) : void
Parameters
- $reference : HookArgument
-
A hook argument
Return values
void —OnIndex()
public
OnIndex(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnNewIndex()
public
OnNewIndex(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —OnSyncronize()
public
OnSyncronize(HookArgument $reference) : void
Parameters
- $reference : HookArgument
Return values
void —RegisterHooks()
public
RegisterHooks() : mixed
Return values
mixed —SetupTemplate()
public
SetupTemplate([mixed $data = null ]) : mixed
Parameters
- $data : mixed = null
Return values
mixed —database()
Get the database instance
private
database() : CalendarDBAL|null