FileAccess Orion

Handler extends SecuredServerPlugin
in package

Implement special handler

This class provides interfaces for system hooks

Tags
category

Plugin

author

Tobias Teichner webmaster@teichner.biz

since

File available since v4.42.0

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
FilePreview()  : array<string|int, mixed>|null
GetAccessList()  : array<string|int, mixed>
handleUpload()  : void
Handle the file upload
Name()  : string
OnMapArrayIncludes()  : void
OnRegisterWidgetIncludes()  : mixed
OnUpdateEntityAttribute()  : void
update object attribute of type file apply changes to a certain object attribute using the given change dataset
RegisterHooks()  : array<string|int, mixed>
Register system hooks
RequestOnUrlParsed()  : mixed
The request hook
ServeRequest()  : mixed
Serve request
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
finishMultiUpload()  : void
Finish multi upload Execute this action when the upload is completed
handleConfigPreset()  : mixed
Handle the context requests
handlePreview()  : void
handleUploadMove()  : void
Handle the upload move call in folder context
updateEntityAttributeFileMove()  : bool
Helper for upload file moving

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

FilePreview()

public static FilePreview(string $path, string $name) : array<string|int, mixed>|null
Parameters
$path : string
$name : string
Return values
array<string|int, mixed>|null

GetAccessList()

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

OnMapArrayIncludes()

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

HookArgument

Return values
void

OnRegisterWidgetIncludes()

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

HookArgument

Return values
mixed

OnUpdateEntityAttribute()

update object attribute of type file apply changes to a certain object attribute using the given change dataset

public static OnUpdateEntityAttribute( $param) : void
Parameters
$param :

HookArgument

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.

Return values
array<string|int, mixed>

A list of hooks to register

RequestOnUrlParsed()

The request hook

public RequestOnUrlParsed(HookArgument $param) : mixed
Parameters
$param : HookArgument

The hook values

Return values
mixed

ServeRequest()

Serve request

public ServeRequest(Request $request, Response $response) : mixed

Serve the request and return appropriate result.

Parameters
$request : Request
$response : Response
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

finishMultiUpload()

Finish multi upload Execute this action when the upload is completed

private finishMultiUpload(string $target, FolderTree $folder, array<string|int, mixed> $payload, Response $resp) : void
Parameters
$target : string

The upload target type, either folder or content

$folder : FolderTree

A folder object

$payload : array<string|int, mixed>

The save setup

$resp : Response

The response object

Return values
void

handleConfigPreset()

Handle the context requests

private handleConfigPreset(Request $request, Response $response) : mixed
Parameters
$request : Request
$response : Response
Return values
mixed

handleUploadMove()

Handle the upload move call in folder context

private handleUploadMove(Request $request, Response $resp) : void
Parameters
$request : Request
$resp : Response
Return values
void

updateEntityAttributeFileMove()

Helper for upload file moving

private static updateEntityAttributeFileMove(array<string|int, mixed> &$file, Result $result) : bool
Parameters
$file : array<string|int, mixed>

The file setting with path aso.

$result : Result

A result object

Return values
bool

The upload move result

Search results