CoolCMS API

UserRolePrivilegeRel extends UserRolePrivilegeRel
in package

Api leaf for `cms_system_user_role_privilege_relations`; columns and the composite key live in the Shared base.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_user_role_privilege_relations'
#[TableAlias]
'userRolePrivilegeRel'

Table of Contents

Properties

$allowed  : bool
$userRoleId  : int
$userRolePrivilegeId  : int

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllowed()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getUserRoleId()  : int
getUserRolePrivilegeId()  : int
isAllowed()  : bool
setAllowed()  : $this
setUserRoleId()  : $this
setUserRolePrivilegeId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$allowed

protected bool $allowed = false
Attributes
#[Column]
$name: 'allowed'
$type: 'boolean'

$userRoleId

protected int $userRoleId = 0
Attributes
#[Column]
$name: 'cms_system_user_roles_user_role_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$userRolePrivilegeId

protected int $userRolePrivilegeId = 0
Attributes
#[Column]
$name: 'cms_system_user_role_privileges_user_role_privilege_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

Methods

__construct()

public __construct([int $userRoleId = 0 ][, int $userRolePrivilegeId = 0 ][, bool $allowed = false ]) : mixed
Parameters
$userRoleId : int = 0
$userRolePrivilegeId : int = 0
$allowed : bool = false

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

setAllowed()

public setAllowed(bool $allowed) : $this
Parameters
$allowed : bool
Return values
$this

setUserRoleId()

public setUserRoleId(int $userRoleId) : $this
Parameters
$userRoleId : int
Return values
$this

setUserRolePrivilegeId()

public setUserRolePrivilegeId(int $userRolePrivilegeId) : $this
Parameters
$userRolePrivilegeId : int
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results