Handler
in package
implements
SearchPlugin, ContentSearchIndex
Implement resource search handler
This class provides interfaces for custom service search handling It implements the weekly job to register planned recurring dates and the hook to add events immediately after change in rules for recurring events
Tags
Interfaces, Classes, Traits and Enums
- SearchPlugin
- Define a system search plugin
- ContentSearchIndex
Table of Contents
- BuildEntry() : object
- DoSearch() : Result
- Do search
- OnAddOrUpdateContent() : void
- Hook on content creation or modification
- OnCronWeekly() : void
- OnDeleteContent() : void
- Hook on delete a content
- OnIndex() : void
- OnNewIndex() : void
- OnSyncronize() : void
- RegisterHooks() : mixed
- SetupTemplate() : mixed
- scheduleEvents() : Result
Methods
BuildEntry()
public
BuildEntry(object $doc[, string|null $language = null ][, array<string|int, mixed>|null $extra = null ]) : object
Parameters
- $doc : object
- $language : string|null = null
- $extra : array<string|int, mixed>|null = null
Tags
Return values
object —DoSearch()
Do search
public
DoSearch(string|null $language, array<string|int, mixed> $payload) : Result
Parameters
- $language : string|null
-
The language to search in
- $payload : array<string|int, mixed>
-
The search request
Tags
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 —OnCronWeekly()
public
OnCronWeekly(HookArgument $reference) : void
Parameters
- $reference : 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) : void
Parameters
- $reference : HookArgument
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 —scheduleEvents()
private
scheduleEvents(Resource $resource, DateTime $from, DateTime $to, array<string|int, mixed> $skip) : Result
Parameters
- $resource : Resource
- $from : DateTime
- $to : DateTime
- $skip : array<string|int, mixed>