KMP PHP API Reference

Warrant extends ActiveWindowBaseEntity
in package

Warrant Entity - Temporal Validation for RBAC Security

Time-bounded authorization determining when role permissions are active. Integrates with PermissionsLoader for security validation.

Lifecycle: Pending → Current → Expired/Deactivated/Cancelled/Declined/Replaced

Tags
see

/docs/4.3-warrant-lifecycle.md For complete warrant documentation

Table of Contents

Constants

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

Properties

$approved_date  : DateTime|null
$branch_id  : int|null
$created  : DateTime|null
$entity_id  : int
$entity_type  : string|null
$expires_on  : DateTime|null
$id  : int
$member  : Member
$member_id  : int
$member_role  : MemberRole
$member_role_id  : int|null
$modified  : DateTime|null
$revoked_reason  : string|null
$revoker_id  : int|null
$start_on  : DateTime|null
$status  : string
$typeIdField  : array<string|int, string>
$warrant_roster_approval_set  : WarrantRoster
$warrant_roster_id  : int
$_accessible  : array<string, bool>

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()  : mixed
Get the expires on to string virtual field.
_getStartOnToString()  : mixed
Get the start on to string virtual field.

Constants

DECLINED_STATUS

public mixed DECLINED_STATUS = 'Declined'

PENDING_STATUS

public mixed PENDING_STATUS = 'Pending'

Properties

$approved_date

public DateTime|null $approved_date

Approval timestamp

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$created

public DateTime|null $created

Creation timestamp

$entity_id

public int $entity_id

Entity instance ID

$entity_type

public string|null $entity_type

Officers, Activities, or Direct Grant

$expires_on

public DateTime|null $expires_on

Expiration date

$member_id

public int $member_id

Member receiving warrant

$member_role_id

public int|null $member_role_id

MemberRole for permission validation

$modified

public DateTime|null $modified

Last modification timestamp

$revoked_reason

public string|null $revoked_reason

Termination reason

$revoker_id

public int|null $revoker_id

Who terminated the warrant

$start_on

public DateTime|null $start_on

Start date

$status

public string $status

Pending, Current, Expired, Deactivated, etc.

$typeIdField

public array<string|int, string> $typeIdField = ['member_role_id']

Type ID field for ActiveWindow behavior

$warrant_roster_id

public int $warrant_roster_id

Batch approval reference

$_accessible

protected array<string, bool> $_accessible = ['member_id' => true, 'warrant_roster_id' => true, 'entity_type' => true, 'entity_id' => true, 'member_role_id' => true, 'expires_on' => true, 'start_on' => true, 'approved_date' => true, 'status' => true, 'revoked_reason' => true, 'revoker_id' => true, 'created_by' => true, 'created' => true, 'member' => true, 'warrant_roster_approval_set' => true, 'member_role' => true]

Mass assignment fields

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()

Get the expires on to string virtual field.

protected _getExpiresOnToString() : mixed

_getStartOnToString()

Get the start on to string virtual field.

protected _getStartOnToString() : mixed

        
On this page

Search results