FileAccess Orion

Handler
in package
implements SearchPlugin, ContentSearchIndex

Implement translation search handler

This class provides interfaces for custom translation search handling

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.144

Interfaces, Classes, Traits and Enums

SearchPlugin
Define a system search plugin
ContentSearchIndex

Table of Contents

$holidays  : array<string|int, mixed>|null
BuildEntry()  : object
Build entry
DoSearch()  : Result
Do search for translations
OnAddOrUpdateContent()  : void
Hook on content creation or modification
OnClearAllCache()  : void
OnCommandLineInterfaceCall()  : void
OnDeleteContent()  : void
Hook on delete a content
OnIndex()  : void
OnNewIndex()  : void
OnSyncronize()  : void
RegisterHooks()  : mixed
SetupTemplate()  : mixed

Properties

$holidays

private array<string|int, mixed>|null $holidays = 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 translation

DoSearch()

Do search for translations

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
Return values
void

OnDeleteContent()

Hook on delete a content

public OnDeleteContent(HookArgument $reference) : void
Parameters
$reference : HookArgument
Return values
void

OnSyncronize()

public OnSyncronize(HookArgument $reference[, bool $is_full = false ]) : void
Parameters
$reference : HookArgument
$is_full : bool = false
Return values
void

RegisterHooks()

public RegisterHooks() : mixed
Tags
inheritDoc
Return values
mixed

SetupTemplate()

public SetupTemplate([mixed $data = null ]) : mixed
Parameters
$data : mixed = null
Return values
mixed

Search results