Overview

Namespaces

  • Charcoal
    • Object
    • User
      • Acl

Classes

  • Manager
  • Permission
  • PermissionCategory
  • Role
  • Overview
  • Namespace
  • Class

Class Role

ACL Roles define hierarchical allowed and denied permissions.

They can be attached to user accounts for fine-grained permission control.

Charcoal\Model\AbstractModel
Extended by Charcoal\User\Acl\Role
Namespace: Charcoal\User\Acl
Located at Charcoal/User/Acl/Role.php
Methods summary
public string
# __toString( )

ACL Role can be used as a string (ident).

ACL Role can be used as a string (ident).

Returns

string
public AclRole
# setParent( string $parent )

Parameters

$parent
Role's parent.

Returns

AclRole
Chainable
public string
# parent( )

Returns

string
public AclRole
# setAllowed( string[]|string|null $allowed )

Parameters

$allowed
The allowed permissions for this role.

Returns

AclRole
Chainable

Throws

InvalidArgumentException
If the passed arguments is not an array, null, or a comma-separated string.
public string[]|null
# allowed( )

Returns

string[]|null
public AclRole
# setDenied( string[]|string|null $denied )

Parameters

$denied
The denied permissions for this role.

Returns

AclRole
Chainable

Throws

InvalidArgumentException
If the passed arguments is not an array, null, or a comma-separated string.
public string[]|null
# denied( )

Returns

string[]|null
public AclRole
# setSuperuser( boolean $isSuper )

Parameters

$isSuper
The superuser flag.

Returns

AclRole
Chainable
public boolean
# superuser( )

Returns

boolean
public AclRole
# setPosition( integer $position )

Parameters

$position
The role's ordering position.

Returns

AclRole
Chainable
public integer
# position( )

Returns

integer
Constants summary
string SEPARATOR
# ','
Properties summary
public string $ident

$ident

$ident

#
public string $parent

The parent ACL role.

The parent ACL role.

This role will inherit all of its parent's permissions.

#
public string[]|null $allowed

List of explicitely allowed permissions.

List of explicitely allowed permissions.

#
public string[]|null $denied

List of explicitely denied permissions.

List of explicitely denied permissions.

#
API documentation generated by ApiGen