FileAccess Orion

Handler extends SecuredServerPlugin
in package
implements SearchPlugin

Implement link search handler

This class provides interfaces for custom link search handling

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v2.3.3

Interfaces, Classes, Traits and Enums

SearchPlugin
Define a system search plugin

Table of Contents

$config  : stdClass|null
Buffer for configuration
$defaultPermissions  : array<string|int, mixed>
The default permission set
$dir  : string
The implementation directory
$name  : string
Name of the plugin
__construct()  : mixed
BuildEntry()  : object
Build entry
DoSearch()  : Result
Do search for links
GetAccessList()  : array<string|int, mixed>
Name()  : string
OnClearAllCache()  : void
RegisterHooks()  : mixed
RequestOnUrlParsed()  : mixed
ServeRequest()  : mixed
settings()  : Result|object
Get/Set the settings
SetupTemplate()  : mixed
handleConfig()  : void
Handle the context requests
hasAccess()  : bool
Check if endpoint is accessible for this user group
isInContext()  : bool
Is in certain context?
setupAttributes()  : void
Set up the permission attribute table

Properties

$defaultPermissions

The default permission set

protected array<string|int, mixed> $defaultPermissions = [['endpoint' => 'config', 'root' => true, 'admin' => true]]

Methods

__construct()

public __construct() : mixed
Return values
mixed

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 link

DoSearch()

Do search for links

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

GetAccessList()

public GetAccessList(User $user) : array<string|int, mixed>
Parameters
$user : User
Return values
array<string|int, mixed>

RegisterHooks()

public RegisterHooks() : mixed
Tags
inheritDoc
Return values
mixed

settings()

Get/Set the settings

public settings([null|object $new = null ]) : Result|object

This method is cached per instance

Parameters
$new : null|object = null

New set of settings to store

Return values
Result|object

SetupTemplate()

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

hasAccess()

Check if endpoint is accessible for this user group

protected hasAccess(string|array<string|int, string> $right[, Response|null $response = null ][, User|null $user = null ]) : bool
Parameters
$right : string|array<string|int, string>
$response : Response|null = null
$user : User|null = null
Return values
bool

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

setupAttributes()

Set up the permission attribute table

protected setupAttributes( &$attributes,  $l) : void
Parameters
$attributes :

array List of attributes

$l :

string The language

Return values
void

Search results