KMP PHP API Reference

MemberRole extends ActiveWindowBaseEntity
in package

MemberRole Entity

Table of Contents

Constants

CANCELLED_STATUS  = 'Cancelled'
CURRENT_STATUS  = 'Current'
DEACTIVATED_STATUS  = 'Deactivated'
EXPIRED_STATUS  = 'Expired'
RELEASED_STATUS  = 'Released'
REPLACED_STATUS  = 'Replaced'
UPCOMING_STATUS  = 'Upcoming'

Properties

$approved_by  : Member
$approver_id  : int
$branch_id  : int|null
$created  : DateTime|null
$expires_on  : Date|null
$id  : int
$Member  : Member
$member_id  : int
$Member_id  : int
$modified  : DateTime|null
$revoked_reason  : string|null
$revoker_id  : int|null
$role  : Role
$role_id  : int
$start_on  : Date
$status  : string
$typeIdField  : array<string|int, mixed>
$_accessible  : array<string, bool>
Fields that can be mass assigned using newEntity() or patchEntity().

Methods

expire()  : bool
Stops an active window for an entity - save your entity after calling
getBranchId()  : int|null
Get the branch ID for authorization checks.
start()  : bool
Starts an active window for an entity - save your entity after calling
_getExpiresOnToString()  : string
Virtual field for timezone-aware expires_on date display
_getGrantedBy()  : mixed
Get the granted by virtual field.
_getStartOnToString()  : string
Virtual field for timezone-aware start_on date display

Constants

Properties

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$created

public DateTime|null $created

Creation timestamp

$modified

public DateTime|null $modified

Last modification timestamp

$typeIdField

public array<string|int, mixed> $typeIdField = ['role_id', 'member_id']

$_accessible

Fields that can be mass assigned using newEntity() or patchEntity().

protected array<string, bool> $_accessible = ['Member_id' => true, 'role_id' => true, 'expires_on' => true, 'start_on' => true, 'approver_id' => true, 'revoker_id' => true, 'Member' => true, 'role' => true, 'approved_by' => true, 'branch_id' => true]

Note that when '' is set to true, this allows all unspecified fields to be mass assigned. For security purposes, it is advised to set '' to false (or remove it), and explicitly make individual fields accessible as needed.

Methods

expire()

Stops an active window for an entity - save your entity after calling

public expire([Datetime $expiresOn = null ]) : bool
Parameters
$expiresOn : Datetime = null
Return values
bool

getBranchId()

Get the branch ID for authorization checks.

public getBranchId() : int|null

Child classes should override for complex branch relationships.

Return values
int|null

The branch ID, or null if no association

start()

Starts an active window for an entity - save your entity after calling

public start([Datetime|null $startOn = null ][, Datetime|null $expiresOn = null ][, int|null $termYears = null ]) : bool
Parameters
$startOn : Datetime|null = null
$expiresOn : Datetime|null = null
$termYears : int|null = null
Return values
bool

_getExpiresOnToString()

Virtual field for timezone-aware expires_on date display

protected _getExpiresOnToString() : string
Return values
string

Formatted expiration date using kingdom default timezone

_getGrantedBy()

Get the granted by virtual field.

protected _getGrantedBy(mixed $value) : mixed
Parameters
$value : mixed

_getStartOnToString()

Virtual field for timezone-aware start_on date display

protected _getStartOnToString() : string
Return values
string

Formatted start date using kingdom default timezone


        
On this page

Search results