FileAccess Orion

Handler
in package
implements SearchPlugin, SearchIndex Uses PluginIsInContext

Implement service search handler

This class provides interfaces for custom service search handling

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.147

Interfaces, Classes, Traits and Enums

SearchPlugin
Define a system search plugin
SearchIndex

Table of Contents

BasketChangeStatus()  : void
BuildEntry()  : object
Build entry
DoSearch()  : Result
Do search for services
OnAddOrUpdateContent()  : void
Called on updating the service or bill content
OnBasketLoadFieldPresetStatus()  : void
OnCommandLineInterfaceCall()  : void
Cli to remove all bill and offer numbers from services
OnDeleteContent()  : void
Called on delete content
OnIndex()  : void
The hook on new index must follow this interface
OnMapArrayIncludes()  : void
OnNewIndex()  : void
On full new index
OnRenameFolder()  : void
Handle rename operations
OnSearchRelationAttributeList()  : void
OnSyncronize()  : void
Called after a sync operation
RegisterHooks()  : array<string|int, mixed>
register system hooks Register a set of handler functions to be called in certain positions.
SetupTemplate()  : Result
Setup getter and setter
isInContext()  : bool
Is in certain context?

Methods

BasketChangeStatus()

public BasketChangeStatus( $reference) : void
Parameters
$reference :

HookArgument

Return values
void

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 service

DoSearch()

Do search for services

public DoSearch(string|null $language, array<string|int, mixed> $payload) : Result

Execute the search by given arguments The supported sort fields are [active, id, price_net, price, description, name, title, status, by_provider_name, company] and the bill and offer numbers as their formatted representatives

Parameters
$language : string|null

The language to search in

$payload : array<string|int, mixed>

The search request

Return values
Result

A system result

OnAddOrUpdateContent()

Called on updating the service or bill content

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

OnBasketLoadFieldPresetStatus()

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

OnCommandLineInterfaceCall()

Cli to remove all bill and offer numbers from services

public OnCommandLineInterfaceCall( $param) : void
Parameters
$param :

HookArgument

Return values
void

OnDeleteContent()

Called on delete content

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

OnIndex()

The hook on new index must follow this interface

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

OnMapArrayIncludes()

public OnMapArrayIncludes( $param) : void
Parameters
$param :

HookArgument

Return values
void

OnRenameFolder()

Handle rename operations

public OnRenameFolder( $reference) : void
Parameters
$reference :

HookArgument

Return values
void

OnSearchRelationAttributeList()

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

OnSyncronize()

Called after a sync operation

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

RegisterHooks()

register system hooks Register a set of handler functions to be called in certain positions.

public RegisterHooks() : array<string|int, mixed>
Return values
array<string|int, mixed>

The list of registered hooks

SetupTemplate()

Setup getter and setter

public SetupTemplate([array<string|int, mixed>|null $data = null ]) : Result

The setter is just an interface and not active

Parameters
$data : array<string|int, mixed>|null = null

New configuration values

Return values
Result

The template fetch result

isInContext()

Is in certain context?

protected isInContext(HookArgument $param, string $type, string $widget) : bool
Parameters
$param : HookArgument

The hook argument

$type : string

The type can be scss, css and js to search in widgets or _ to search in global includes

$widget : string

The widget to search for

Return values
bool

Search results