Class Role

Summary

Fully Qualified Name: Laminas\Permissions\Rbac\Role
Implements: RoleInterface

Description

Methods

Name Description Defined By
__construct() Role
addChild() Add a child role. Role
addParent() Add a parent role. Role
addPermission() Add a permission to the role. Role
getChildren() Get all child roles Role
getName() Get the name of the role. Role
getParents() Get the parent roles. Role
getPermissions() Get the permissions of the role, included all the permissions of the children if $children == true Role
hasPermission() Checks if a permission exists for this role or any child roles. Role

Method Details

__construct()

Parameter Name Type Description
$name

Returns: void

addChild()

Add a child role.

Parameter Name Type Description
$child

Returns:

addParent()

Add a parent role.

Parameter Name Type Description
$parent

Returns:

addPermission()

Add a permission to the role.

Parameter Name Type Description
$name

Returns:

getChildren()

Get all child roles

Returns: \RoleInterface[]

getName()

Get the name of the role.

Returns:

getParents()

Get the parent roles.

Returns: \RoleInterface[]

getPermissions()

Get the permissions of the role, included all the permissions of the children if $children == true

Parameter Name Type Description
$children

Returns:

hasPermission()

Checks if a permission exists for this role or any child roles.

Parameter Name Type Description
$name

Returns:

Top