KMP PHP API Reference

ApprovalContext
in package

Value object representing display context for a pending approval.

Carries the title, description, structured fields, and metadata needed to render an approval card in the unified approvals UI.

Table of Contents

Properties

$description  : string
$entityUrl  : string|null
$fields  : array<string|int, mixed>
$icon  : string
$requester  : string|null
$requesterMemberId  : int|null
$title  : string

Methods

__construct()  : mixed
getDescription()  : string
getEntityUrl()  : string|null
getFields()  : array<int, array{label: string, value: string}>
getIcon()  : string
getRequester()  : string|null
getRequesterMemberId()  : int|null
getTitle()  : string
toArray()  : array<string, mixed>
Serialize to a plain array for JSON responses or template consumption.

Properties

$requesterMemberId read-only

private int|null $requesterMemberId = null

Methods

__construct()

public __construct(string $title, string $description[, array<int, array{label: string, value: string}> $fields = [] ][, string|null $entityUrl = null ][, string $icon = 'bi-question-circle' ][, string|null $requester = null ][, int|null $requesterMemberId = null ]) : mixed
Parameters
$title : string

Summary line, e.g. "Authorization Request: Heavy Fighting"

$description : string

Longer explanation of what is being approved

$fields : array<int, array{label: string, value: string}> = []

Key/value display pairs

$entityUrl : string|null = null

Link back to the entity under review

$icon : string = 'bi-question-circle'

Bootstrap icon class, e.g. 'bi-shield-check'

$requester : string|null = null

Display name of the person who initiated the request

$requesterMemberId : int|null = null

Member ID snapshot for filtering and joins

getDescription()

public getDescription() : string
Return values
string

getEntityUrl()

public getEntityUrl() : string|null
Return values
string|null

getFields()

public getFields() : array<int, array{label: string, value: string}>
Return values
array<int, array{label: string, value: string}>

getRequester()

public getRequester() : string|null
Return values
string|null

getRequesterMemberId()

public getRequesterMemberId() : int|null
Return values
int|null

toArray()

Serialize to a plain array for JSON responses or template consumption.

public toArray() : array<string, mixed>
Return values
array<string, mixed>
On this page

Search results