audit_log
class audit_log extends audit_log
Public SDK Event Entity.
Represents domain events emitted by the framework; use it for typing or to extend with data specific to your extension.
Methods
Serializes the object to a value that can be natively serialized by json_encode().
No description
Factory method for a new audit log entry.
Details
in
abstract_entity at line 39
mixed
__get(string $name)
Magic getter to allow reading protected properties.
in
abstract_entity at line 55
bool
__isset(string $name)
Magic isset to allow checking protected properties.
in
abstract_entity at line 66
void
__set(string $name, mixed $value)
Magic setter.
in
abstract_entity at line 80
array
jsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
in
audit_log at line 58
__construct(int|null $id, string|null $uuid, string $subjecttype, int|null $subjectid, string|null $subjectkey, int|null $courseid, string $extension, string $eventname, int|null $userid, string $origin = 'system', string|null $correlationid = null, string|null $message = null, array|string|null $contextdata = null, int $hasdiff = 0, int $hassnapshot = 0, int $timecreated = 0)
No description
in
audit_log at line 86
static audit_log
create(string $extension, string $eventname, int|null $subjectid = null, int|null $userid = null, string $subjecttype = 'item', int|null $courseid = null, string|null $subjectkey = null, string|null $correlationid = null, string|null $uuid = null, int|null $timecreated = null)
Factory method for a new audit log entry.
in
audit_log at line 121
array
get_diffs()
No description
in
audit_log at line 126
snapshot_data|null
get_snapshot()
Get the full data snapshot if available.
in
audit_log at line 131
audit_log
with_diff(revision_diff $diff)
No description
in
audit_log at line 144
audit_log
with_snapshot(snapshot_data $snapshot)
No description
in
audit_log at line 161
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
in
audit_log at line 166
string|null
get_uuid()
Stable identifier for the audit record.
in
audit_log at line 171
string
get_subjecttype()
Audited subject type.
in
audit_log at line 176
int|null
get_subjectid()
Audited subject identifier.
in
audit_log at line 181
string|null
get_subjectkey()
Audited subject natural key.
in
audit_log at line 186
int|null
get_courseid()
Related course identifier.
in
audit_log at line 191
int|null
get_itemid()
The ID of the item affected by the event.
in
audit_log at line 196
string
get_extension()
Get the extension slug that emitted the event.
in
audit_log at line 201
string
get_eventname()
Get the canonical event name identifier.
in
audit_log at line 206
string
get_eventtype()
Get the event type identifier.
in
audit_log at line 211
int|null
get_userid()
Get the user ID responsible for the event.
in
audit_log at line 216
string
get_origin()
Get the origin source (e.g., web, api).
in
audit_log at line 221
string|null
get_message()
Get the optional human-readable message.
in
audit_log at line 226
string|null
get_correlationid()
Trace correlation identifier.
in
audit_log at line 234
array
get_contextdata()
No description
in
audit_log at line 239
bool
has_diff()
Does this event contain field differences?
in
audit_log at line 244
bool
has_snapshot()
Does this event contain a full item snapshot?
in
audit_log at line 249
int
get_timecreated()
Get the creation timestamp of the event.
in
audit_log at line 257
array
to_array()
No description