audit_log
class audit_log extends audit_log
Public SDK Audit Log Entity.
Represents audit records emitted by the framework aggregate; use it for typing or extension-specific helpers.
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.
Get the full data snapshot if available.
Details
in
abstract_entity at line 37
mixed
__get(string $name)
Magic getter to allow reading protected properties.
in
abstract_entity at line 53
bool
__isset(string $name)
Magic isset to allow checking protected properties.
in
abstract_entity at line 64
void
__set(string $name, mixed $value)
Magic setter.
in
abstract_entity at line 78
array
jsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
in
audit_log at line 56
__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 84
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 119
array
get_diffs()
No description
in
audit_log at line 124
audit_snapshot_interface|null
get_snapshot()
Get the full data snapshot if available.
in
audit_log at line 129
audit_log
with_diff(audit_diff_interface $diff)
No description
in
audit_log at line 152
audit_log
with_snapshot(audit_snapshot_interface $snapshot)
No description
in
audit_log at line 169
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
in
audit_log at line 174
string|null
get_uuid()
Stable identifier for the audit record.
in
audit_log at line 179
string
get_subjecttype()
Audited subject type.
in
audit_log at line 184
int|null
get_subjectid()
Audited subject identifier.
in
audit_log at line 189
string|null
get_subjectkey()
Audited subject natural key.
in
audit_log at line 194
int|null
get_courseid()
Related course identifier.
in
audit_log at line 199
int|null
get_itemid()
The ID of the item affected by this audit record.
in
audit_log at line 204
string
get_extension()
Get the extension slug that emitted the audited fact.
in
audit_log at line 209
string
get_eventname()
Get the canonical audited event name identifier.
in
audit_log at line 214
string
get_eventtype()
Compatibility alias for event type identifier.
in
audit_log at line 219
int|null
get_userid()
Get the user ID responsible for the audited fact.
in
audit_log at line 224
string
get_origin()
Get the origin source (e.g., web, api).
in
audit_log at line 229
string|null
get_message()
Get the optional human-readable message.
in
audit_log at line 234
string|null
get_correlationid()
Trace correlation identifier.
in
audit_log at line 242
array
get_contextdata()
No description
in
audit_log at line 247
bool
has_diff()
Does this audit record contain field differences?
in
audit_log at line 252
bool
has_snapshot()
Does this audit record contain a full item snapshot?
in
audit_log at line 257
int
get_timecreated()
Get the creation timestamp of the audit record.
in
audit_log at line 265
array
to_array()
No description