Documentation

PageAuthorsTrait

Trait PageAuthorsTrait

Table of Contents

Properties

$_authors  : array<int, UserInterface>
$_permissionsCache  : array<string|int, mixed>|null

Methods

getAuthors()  : array<int, UserInterface>
Get list of all author objects.
getPermissions()  : array<string|int, mixed>
hasAuthor()  : bool
Returns true if object has the named author.
isParentAuthorized()  : bool|null
isAuthorizedByGroup()  : bool|null
Group authorization works as follows:
isAuthorizedOverride()  : bool|null
loadAuthors()  : array<int, UserInterface>
loadPermissions()  : array<string|int, mixed>

Properties

$_permissionsCache

private array<string|int, mixed>|null $_permissionsCache

Methods

getPermissions()

public getPermissions([bool $inherit = false ]) : array<string|int, mixed>
Parameters
$inherit : bool = false
Return values
array<string|int, mixed>

hasAuthor()

Returns true if object has the named author.

public hasAuthor(string $username) : bool
Parameters
$username : string
Return values
bool

isParentAuthorized()

public isParentAuthorized(string $action[, string|null $scope = null ][, UserInterface|null $user = null ][, bool $isAuthor = false ]) : bool|null
Parameters
$action : string
$scope : string|null = null
$user : UserInterface|null = null
$isAuthor : bool = false
Return values
bool|null

isAuthorizedByGroup()

Group authorization works as follows:

protected isAuthorizedByGroup(UserInterface $user, string $action, string $scope, bool $isMe, bool $isAuthor) : bool|null
  1. if any of the groups deny access, return false
  2. else if any of the groups allow access, return true
  3. else return null
Parameters
$user : UserInterface
$action : string
$scope : string
$isMe : bool
$isAuthor : bool
Return values
bool|null

isAuthorizedOverride()

protected isAuthorizedOverride(UserInterface $user, string $action, string $scope, bool $isMe) : bool|null
Parameters
$user : UserInterface
$action : string
$scope : string
$isMe : bool
Return values
bool|null

loadPermissions()

protected loadPermissions([array<string|int, mixed> $parent = [] ]) : array<string|int, mixed>
Parameters
$parent : array<string|int, mixed> = []
Return values
array<string|int, mixed>

        
On this page

Search results