Skip to content

RbacRole

Properties

childrenNames

protected array $childrenNames

permissionNames

protected array $permissionNames

name

public string $name

description

public string $description

rbacStorageCollection

protected \Codefy\Framework\Auth\Rbac\Resource\StorageResource $rbacStorageCollection

Methods

__construct

public __construct(string $name, string $description, \Codefy\Framework\Auth\Rbac\Resource\StorageResource $rbacStorageCollection): mixed

Parameters:

Parameter Type Description
$name string
$description string
$rbacStorageCollection \Codefy\Framework\Auth\Rbac\Resource\StorageResource

addChild

public addChild(\Codefy\Framework\Auth\Rbac\Entity\Role $role): void

Parameters:

Parameter Type Description
$role \Codefy\Framework\Auth\Rbac\Entity\Role

removeChild

public removeChild(string $roleName): void

Parameters:

Parameter Type Description
$roleName string

getChildren

public getChildren(): \Codefy\Framework\Auth\Rbac\Entity\Role[]

addPermission

public addPermission(\Codefy\Framework\Auth\Rbac\Entity\Permission $permission): void

Parameters:

Parameter Type Description
$permission \Codefy\Framework\Auth\Rbac\Entity\Permission

removePermission

public removePermission(string $permissionName): void

Parameters:

Parameter Type Description
$permissionName string

getPermissions

public getPermissions(bool $withChildren = false): \Codefy\Framework\Auth\Rbac\Entity\Permission[]

Parameters:

Parameter Type Description
$withChildren bool

checkAccess

public checkAccess(string $permissionName, array|null $params = null): bool

Parameters:

Parameter Type Description
$permissionName string
$params array|null

collectChildrenPermissions

protected collectChildrenPermissions(\Codefy\Framework\Auth\Rbac\Entity\Permission $permission, mixed& $result): void

Parameters:

Parameter Type Description
$permission \Codefy\Framework\Auth\Rbac\Entity\Permission
$result mixed


Automatically generated on 2025-10-13