Documentation

Shared extends Ajax
in package

Operate on RedBean shared lists

Table of Contents

$context  : Context
$controller  : Ajax
$permissions  : array<, mixed>
__construct()  : mixed
Constructor
handle()  : void
Carry out operations on RB shared lists
requires()  : array<, mixed>
Return permission requirements
checkAccess()  : void
Check access to a bean
fieldExists()  : bool
Check that a bean has a field. Do not allow id field to be manipulated.
restCheck()  : array<, mixed>
Check URL string for n parameter values and pull them out
checkPerms()  : void
Check that user has the permissions that are specified in an array

Properties

$permissions

private static array<, mixed> $permissions = [ConfigFramework::CONFIG => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::FORM => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::FORMFIELD => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::PAGE => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::PAGEROLE => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::ROLECONTEXT => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::ROLENAME => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::TABLE => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []], ConfigFramework::USER => [TRUE, [[ConfigFramework::FWCONTEXT, ConfigFramework::ADMINROLE]], []]]

Methods

__construct()

Constructor

public __construct(Context $context, Ajax $controller) : mixed
Parameters
$context : Context
$controller : Ajax
Return values
mixed

handle()

Carry out operations on RB shared lists

public final handle() : void
Tags
throws
BadOperation
Return values
void

requires()

Return permission requirements

public requires() : array<, mixed>
Return values
array<, mixed>

checkAccess()

Check access to a bean

protected final checkAccess(OODBBean|null $user, array<, mixed> $permissions, string $bean[, string $field = '' ][, bool $idOK = FALSE ]) : void
Parameters
$user : OODBBean|null
$permissions : array<, mixed>
$bean : string
$field : string = ''
$idOK : bool = FALSE
Tags
throws
Forbidden
Return values
void

fieldExists()

Check that a bean has a field. Do not allow id field to be manipulated.

protected final fieldExists(string $type, string $field[, bool $idok = FALSE ]) : bool
Parameters
$type : string

The type of bean

$field : string

The field name

$idok : bool = FALSE

Allow the id field

Tags
throws
BadValue
Return values
bool

restCheck()

Check URL string for n parameter values and pull them out

protected restCheck(int $count) : array<, mixed>

The value in $rest[0] is assumed to be an opcode so we always start at $rest[1]

Parameters
$count : int

The number to check for

Tags
throws
ParameterCount
Return values
array<, mixed>

The parameter values in an array indexed from 0 with last parameter, anything left in an array

checkPerms()

Check that user has the permissions that are specified in an array

private checkPerms(OODBBean|null $user, array<, mixed> $pairs) : void
Parameters
$user : OODBBean|null

The current user or NULL

$pairs : array<, mixed>

The permission array

Tags
throws
Forbidden
psalm-suppress

PossiblyNullReference

Return values
void

Search results