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
$_authors
private
array<int, UserInterface>
$_authors
$_permissionsCache
private
array<string|int, mixed>|null
$_permissionsCache
Methods
getAuthors()
Get list of all author objects.
public
getAuthors() : array<int, UserInterface>
Return values
array<int, UserInterface>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
boolisParentAuthorized()
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|nullisAuthorizedByGroup()
Group authorization works as follows:
protected
isAuthorizedByGroup(UserInterface $user, string $action, string $scope, bool $isMe, bool $isAuthor) : bool|null
- if any of the groups deny access, return false
- else if any of the groups allow access, return true
- else return null
Parameters
- $user : UserInterface
- $action : string
- $scope : string
- $isMe : bool
- $isAuthor : bool
Return values
bool|nullisAuthorizedOverride()
protected
isAuthorizedOverride(UserInterface $user, string $action, string $scope, bool $isMe) : bool|null
Parameters
- $user : UserInterface
- $action : string
- $scope : string
- $isMe : bool
Return values
bool|nullloadAuthors()
protected
loadAuthors(iterable<string|int, mixed> $authors) : array<int, UserInterface>
Parameters
- $authors : iterable<string|int, mixed>
Return values
array<int, UserInterface>loadPermissions()
protected
loadPermissions([array<string|int, mixed> $parent = [] ]) : array<string|int, mixed>
Parameters
- $parent : array<string|int, mixed> = []