interface audit_log_interface implements entity_interface

internal  
 

Interface Event (Audit Log).

Contract for the audit log entity found in middag_audit_log. Represents an immutable record of something that happened in the system.

Methods

int|null
get_id()

Get the entity unique identifier.

array
to_array()

Convert the entity state to a plain associative array.

string|null
get_uuid()

Stable identifier for the audit record.

string
get_subjecttype()

Audited subject type.

int|null
get_subjectid()

Audited subject identifier.

string|null
get_subjectkey()

Audited subject natural key.

int|null
get_courseid()

Related course identifier.

int|null
get_itemid()

The ID of the item affected by the event.

string
get_extension()

Get the extension slug that emitted the event.

string
get_eventtype()

Get the event type identifier.

string
get_eventname()

Get the canonical event name identifier.

int|null
get_userid()

Get the user ID responsible for the event.

string
get_origin()

Get the origin source (e.g., web, api).

string|null
get_message()

Get the optional human-readable message.

string|null
get_correlationid()

Trace correlation identifier.

array
get_contextdata()

Returns the structured context data associated with the event.

bool
has_diff()

Does this event contain field differences?

bool
has_snapshot()

Does this event contain a full item snapshot?

int
get_timecreated()

Get the creation timestamp of the event.

array
get_diffs()

Get the list of changes associated with this event.

snapshot_data|null
get_snapshot()

Get the full data snapshot if available.

Details

in entity_interface at line 38
int|null get_id()

Get the entity unique identifier.

Returns null if the entity has not been persisted yet.

Return Value

int|null

in entity_interface at line 46
array to_array()

Convert the entity state to a plain associative array.

Useful for DTO conversion, logging, or debugging.

Return Value

array

at line 36
string|null get_uuid()

Stable identifier for the audit record.

Return Value

string|null

at line 41
string get_subjecttype()

Audited subject type.

Return Value

string

at line 46
int|null get_subjectid()

Audited subject identifier.

Return Value

int|null

at line 51
string|null get_subjectkey()

Audited subject natural key.

Return Value

string|null

at line 56
int|null get_courseid()

Related course identifier.

Return Value

int|null

at line 63
int|null get_itemid()

The ID of the item affected by the event.

Return Value

int|null

at line 68
string get_extension()

Get the extension slug that emitted the event.

Return Value

string

at line 73
string get_eventtype()

Get the event type identifier.

Return Value

string

at line 78
string get_eventname()

Get the canonical event name identifier.

Return Value

string

at line 83
int|null get_userid()

Get the user ID responsible for the event.

Return Value

int|null

at line 88
string get_origin()

Get the origin source (e.g., web, api).

Return Value

string

at line 93
string|null get_message()

Get the optional human-readable message.

Return Value

string|null

at line 98
string|null get_correlationid()

Trace correlation identifier.

Return Value

string|null

at line 106
array get_contextdata()

Returns the structured context data associated with the event.

Decoded from JSON storage into an array.

Return Value

array

at line 113
bool has_diff()

Does this event contain field differences?

Return Value

bool

at line 120
bool has_snapshot()

Does this event contain a full item snapshot?

Return Value

bool

at line 125
int get_timecreated()

Get the creation timestamp of the event.

Return Value

int

at line 132
array get_diffs()

Get the list of changes associated with this event.

Return Value

array

at line 139
snapshot_data|null get_snapshot()

Get the full data snapshot if available.

Return Value

snapshot_data|null