interface event_interface implements entity_interface

Interface Event (Audit Log).

Contract for the audit log entity found in middag_event. 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.

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.

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.

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 36
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 44
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
int|null get_itemid()

The ID of the item affected by the event.

Return Value

int|null

at line 41
string get_extension()

Get the extension slug that emitted the event.

Return Value

string

at line 46
string get_eventtype()

Get the event type identifier.

Return Value

string

at line 51
int|null get_userid()

Get the user ID responsible for the event.

Return Value

int|null

at line 56
string get_origin()

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

Return Value

string

at line 61
string|null get_message()

Get the optional human-readable message.

Return Value

string|null

at line 69
array get_contextdata()

Returns the structured context data associated with the event.

Decoded from JSON storage into an array.

Return Value

array

at line 76
bool has_diff()

Does this event contain field differences?

Return Value

bool

at line 83
bool has_snapshot()

Does this event contain a full item snapshot?

Return Value

bool

at line 88
int get_timecreated()

Get the creation timestamp of the event.

Return Value

int

at line 95
array get_diffs()

Get the list of changes associated with this event.

Return Value

array

at line 102
snapshot_data|null get_snapshot()

Get the full data snapshot if available.

Return Value

snapshot_data|null