FileAccess Orion

Handler
in package
implements SearchPlugin, ContentSearchIndex Uses PluginIsInContext, ParallelSearchIndex

Implement search handler

This class provides interfaces for custom search handling

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v2.3.7

Interfaces, Classes, Traits and Enums

SearchPlugin
Define a system search plugin
ContentSearchIndex

Table of Contents

$assignable_types  : array<string|int, mixed>|null
The list of assignable types
$multi_threads  : int
Allow the multi threading with this parallel tasks
AssignableTypes()  : array<string|int, mixed>|null
Get list of assignable types that are handled in general
BuildEntry()  : object
Build entry
DoSearch()  : Result
Do search for general objects
OnAddOrUpdateContent()  : void
Hook on content creation or modification
OnBeforeAddOrUpdateContent()  : void
Hook to set changer and changed date
OnCommandLineInterfaceCall()  : void
Cli to fix and check relation id duplications
OnConvertContent()  : void
OnDeleteContent()  : void
Hook on delete a content
OnGetEntityAttributes()  : void
OnIndex()  : void
OnLoadEntityFormPreset()  : void
OnMapArrayIncludes()  : void
Add some scripts to the backend to interact with system frontend hooks
OnNewIndex()  : void
OnRenameFolder()  : void
Handle rename operations
OnSyncronize()  : void
RegisterHooks()  : mixed
RegisterPublicAssetBasePath()  : void
SetupTemplate()  : mixed
doIndex()  : Result
isInContext()  : bool
Is in certain context?
getRelationsByContent()  : array<string|int, General>
handlesType()  : int
Get type that are handled with this one
resolveContentRecursive()  : void
Resolve contents that are linked by relation to the given content
updateLinkedRelations()  : void
Update relations Update all the known linked relations of the updated content

Properties

$assignable_types

The list of assignable types

private array<string|int, mixed>|null $assignable_types = null

$multi_threads

Allow the multi threading with this parallel tasks

private int $multi_threads = 3

Methods

AssignableTypes()

Get list of assignable types that are handled in general

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

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 general

DoSearch()

Do search for general objects

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

OnBeforeAddOrUpdateContent()

Hook to set changer and changed date

public OnBeforeAddOrUpdateContent(HookArgument $reference) : void

When save some contents it should set the changed date and the changer from current session It will set server to null for system user context.

Parameters
$reference : HookArgument

A hook argument

Return values
void

OnCommandLineInterfaceCall()

Cli to fix and check relation id duplications

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

HookArgument

Return values
void

OnConvertContent()

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

HookArgument

Return values
void

OnDeleteContent()

Hook on delete a content

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

OnMapArrayIncludes()

Add some scripts to the backend to interact with system frontend hooks

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

HookArgument

Return values
void

OnRenameFolder()

Handle rename operations

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

HookArgument

Return values
void

OnSyncronize()

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

RegisterHooks()

public RegisterHooks() : mixed
Tags
inheritDoc
Return values
mixed

RegisterPublicAssetBasePath()

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

SetupTemplate()

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

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

getRelationsByContent()

private getRelationsByContent(int|string $id, string $type) : array<string|int, General>
Parameters
$id : int|string

An system object id

$type : string

The relation type

Return values
array<string|int, General>

List of linked relations

handlesType()

Get type that are handled with this one

private handlesType( $type) : int
Parameters
$type :
Return values
int

resolveContentRecursive()

Resolve contents that are linked by relation to the given content

private resolveContentRecursive(BaseContent $content, stdClass $lines) : void
Parameters
$content : BaseContent
$lines : stdClass
Return values
void

updateLinkedRelations()

Update relations Update all the known linked relations of the updated content

private updateLinkedRelations(HookArgument $reference, Search $client) : void
Parameters
$reference : HookArgument

The hook argument

$client : Search

The search interface

Return values
void

Search results