event_interface
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
The ID of the item affected by the event.
Get the extension slug that emitted the event.
Get the event type identifier.
Get the user ID responsible for the event.
Get the origin source (e.g., web, api).
Get the optional human-readable message.
Returns the structured context data associated with the event.
Does this event contain field differences?
Does this event contain a full item snapshot?
Get the creation timestamp of the event.
Get the list of changes associated with this event.
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.
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.
at line 36
int|null
get_itemid()
The ID of the item affected by the event.
at line 41
string
get_extension()
Get the extension slug that emitted the event.
at line 46
string
get_eventtype()
Get the event type identifier.
at line 51
int|null
get_userid()
Get the user ID responsible for the event.
at line 56
string
get_origin()
Get the origin source (e.g., web, api).
at line 61
string|null
get_message()
Get the optional human-readable message.
at line 69
array
get_contextdata()
Returns the structured context data associated with the event.
Decoded from JSON storage into an array.
at line 76
bool
has_diff()
Does this event contain field differences?
at line 83
bool
has_snapshot()
Does this event contain a full item snapshot?
at line 88
int
get_timecreated()
Get the creation timestamp of the event.
at line 95
array
get_diffs()
Get the list of changes associated with this event.
at line 102
snapshot_data|null
get_snapshot()
Get the full data snapshot if available.