FileAccess Orion

Handler
in package
implements SearchPlugin, ContentSearchIndex Uses ParallelSearchIndex, PluginIsInContext

Implement basket search handler

This class provides interfaces for custom basket search handling

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.170

Interfaces, Classes, Traits and Enums

SearchPlugin
Define a system search plugin
ContentSearchIndex

Table of Contents

$_bookingsDb  : BookingsDBAL|null
Buffer for bookings db
$multi_threads  : int
Allow the multi threading with this parallel tasks
BasketChangeStatus()  : void
Called on basket status change, reaction is needed on cancel
BuildEntry()  : stdClass
Build entry
DoSearch()  : Result
Do search for baskets
DoSearchBooking()  : Result
Do search for baskets
DoSearchStorageMovement()  : Result
FindFittingRoom()  : array<string|int, mixed>|null
Find a fitting room for persons count and frame size
LisFreeRooms()  : array<string|int, mixed>|null
ListBookedRooms()  : array<string|int, mixed>|null
Get booked person count mapped by room
OnAddOrUpdateContent()  : void
React on new bookings and baskets
OnAdminChangeBasket()  : void
OnCommandLineInterfaceCall()  : void
OnDeleteContent()  : void
React on basket deletion
OnIndex()  : void
OnMergeUserAccount()  : void
Move ownership of linked baskets to new master account
OnNewIndex()  : void
OnRegisterWidgetIncludes()  : void
OnSyncronize()  : void
OnWidgetUpdateEntity()  : void
RegisterHooks()  : array<string|int, mixed>
Register system hooks
SetupTemplate()  : Result
Setup getter and setter
doIndex()  : Result
isInContext()  : bool
Is in certain context?
bookBasketRooms()  : Result
bookingsDb()  : BookingsDBAL
bookRoom()  : Result
Create a single booking into certain space
checkBasketArticles()  : Result
fixBasketArticles()  : Result

Properties

$multi_threads

Allow the multi threading with this parallel tasks

private int $multi_threads = 3

Methods

BasketChangeStatus()

Called on basket status change, reaction is needed on cancel

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

HookArgument

Return values
void

BuildEntry()

Build entry

public BuildEntry(object $doc[, string|null $language = null ][, array<string|int, mixed>|null $extra = null ]) : stdClass

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
stdClass

A result object

DoSearch()

Do search for baskets

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

DoSearchBooking()

Do search for baskets

public DoSearchBooking(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

DoSearchStorageMovement()

public DoSearchStorageMovement(string|null $language, array<string|int, mixed> $payload) : Result
Parameters
$language : string|null
$payload : array<string|int, mixed>
Return values
Result

FindFittingRoom()

Find a fitting room for persons count and frame size

public FindFittingRoom(string $article_id, array<string|int, mixed> $frames, int $persons, int $frame_size[, string|null $room_article_id = null ][, string|null $target_room = null ]) : array<string|int, mixed>|null
Parameters
$article_id : string

The reference article parent id

$frames : array<string|int, mixed>

The found frames

$persons : int

The requesting persons

$frame_size : int

The target frame size

$room_article_id : string|null = null

When set, the frame size does not matter but the actually linked room article

$target_room : string|null = null

Explicit given target room id in context of article

Return values
array<string|int, mixed>|null

LisFreeRooms()

public LisFreeRooms(string $article_id, array<string|int, mixed> $frames) : array<string|int, mixed>|null
Parameters
$article_id : string
$frames : array<string|int, mixed>
Return values
array<string|int, mixed>|null

ListBookedRooms()

Get booked person count mapped by room

public ListBookedRooms(array<string|int, mixed> $room_ids) : array<string|int, mixed>|null
Parameters
$room_ids : array<string|int, mixed>
Return values
array<string|int, mixed>|null

OnAddOrUpdateContent()

React on new bookings and baskets

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

OnDeleteContent()

React on basket deletion

public OnDeleteContent(HookArgument $reference) : void

Clean search index and the bookings list

Parameters
$reference : HookArgument
Return values
void

OnMergeUserAccount()

Move ownership of linked baskets to new master account

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

OnRegisterWidgetIncludes()

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

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()

Register system hooks

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

Register a set of handler functions to be called in certain positions. These are mainly used to manage the basket search with update interfaces

Return values
array<string|int, mixed>

The hooks to register

SetupTemplate()

Setup getter and setter

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

The setter is just an interface and not active

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

New configuration values

Return values
Result

The template fetch result

doIndex()

protected doIndex(string $type, array<string|int, mixed> $list, CronJob $job, bool $is_full) : Result
Parameters
$type : string
$list : array<string|int, mixed>
$job : CronJob
$is_full : bool
Return values
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

bookBasketRooms()

private bookBasketRooms(Basket|null $basket) : Result
Parameters
$basket : Basket|null
Return values
Result

bookRoom()

Create a single booking into certain space

private bookRoom(array<string|int, mixed> $room, string $article_id, string $basket_id, int $persons) : Result
Parameters
$room : array<string|int, mixed>

The room data

$article_id : string

The related article

$basket_id : string

The causing basket

$persons : int

The persons to book into

Return values
Result

checkBasketArticles()

private checkBasketArticles(Basket|null $basket) : Result
Parameters
$basket : Basket|null
Return values
Result

fixBasketArticles()

private fixBasketArticles(Basket|null $basket) : Result
Parameters
$basket : Basket|null
Return values
Result

Search results