MIDDAG for Moodle

audit_log_repository_interface extends repository_interface

Contract for audit log persistence.

Table of Contents

Methods

find_by_id()  : null|audit_log_interface
Find audit log by ID and hydrate child aggregates.
find_by_item()  : array<string|int, audit_log_interface>
Find latest audit logs for an item.
log()  : audit_log_interface
Persist an audit log and its associated data (diffs/snapshot).

Methods

find_by_id()

Find audit log by ID and hydrate child aggregates.

public find_by_id(int $id) : null|audit_log_interface
Parameters
$id : int
Tags
throws
dml_exception
Return values
null|audit_log_interface

find_by_item()

Find latest audit logs for an item.

public find_by_item(int $itemid[, int $limit = 20 ]) : array<string|int, audit_log_interface>
Parameters
$itemid : int
$limit : int = 20
Tags
throws
dml_exception
Return values
array<string|int, audit_log_interface>

log()

Persist an audit log and its associated data (diffs/snapshot).

public log(audit_log_interface $event) : audit_log_interface
Parameters
$event : audit_log_interface
Tags
throws
dml_exception
Return values
audit_log_interface

The persisted audit log (with ID)


        
On this page

Search results