Copied!

RoleDraft

RoleDraft.php : 16
Extends Role

This class represents a draft of a role.

Constants

publicSTATUS_DEFINED

Role.php : 23
public int STATUS_DEFINED = 0

Status constant for defined (aka "published") role

publicSTATUS_DRAFT

Role.php : 26
public int STATUS_DRAFT = 1

Status constant for draft (aka "temporary") role

Properties

public $id read-only

Role.php
public int $id

the internal id of the role

public $identifier read-only

Role.php
public string $identifier

the identifier of the role

public $policies read-only

Role.php
public array<string|int, Policy$policies

an array of the policies Policy of the role.

public $policies read-only

RoleDraft.php
public array<string|int, PolicyDraft$policies

protected $id

Role.php : 33

ID of the user role.

protected int $id

protected $identifier

Role.php : 41

Readable string identifier of a role in 4.x. this is mapped to the role name.

protected string $identifier

protected $status

Role.php : 48

The status of the role.

protected int $status

One of Role::STATUS_DEFINED|Role::STATUS_DRAFT

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$properties array<string|int, mixed> [] -

publicgetPolicies()

Role.php : 60

Returns the list of policies of this role.

public abstract getPolicies() : array<string|int, Policy>

Return values

array<string|int, Policy>

publicgetStatus()

Role.php : 50
public getStatus() : int

Return values

int

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>