MIDDAG for Moodle

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.

Tags
example

class extension_audit_log extends \local_middag\base\domain\audit_log { // Add helper methods specific to your extension. }

Table of Contents

Methods

__construct()  : mixed
__get()  : mixed
Magic getter to allow reading protected properties.
__isset()  : bool
Magic isset to allow checking protected properties.
__set()  : void
Magic setter.
create()  : self
Factory method for a new audit log entry.
get_contextdata()  : array<string, mixed>
get_correlationid()  : string|null
get_courseid()  : int|null
get_diffs()  : array<string|int, audit_diff_interface>
get_eventname()  : string
get_eventtype()  : string
get_extension()  : string
get_id()  : int|null
get_itemid()  : int|null
get_message()  : string|null
get_origin()  : string
get_snapshot()  : audit_snapshot_interface|null
get_subjectid()  : int|null
get_subjectkey()  : string|null
get_subjecttype()  : string
get_timecreated()  : int
get_userid()  : int|null
get_uuid()  : string|null
has_diff()  : bool
has_snapshot()  : bool
jsonSerialize()  : array<string, mixed>
Serializes the object to a value that can be natively serialized by json_encode().
to_array()  : array<string, mixed>
with_diff()  : self
with_message()  : self
with_snapshot()  : self

Methods

__construct()

public __construct(null|int $id, null|string $uuid, string $subjecttype, null|int $subjectid, null|string $subjectkey, null|int $courseid, string $extension, string $eventname, null|int $userid[, string $origin = 'system' ][, null|string $correlationid = null ][, null|string $message = null ][, null|array<string, mixed>|string $contextdata = null ][, int $hasdiff = 0 ][, int $hassnapshot = 0 ][, int $timecreated = 0 ]) : mixed
Parameters
$id : null|int
$uuid : null|string
$subjecttype : string
$subjectid : null|int
$subjectkey : null|string
$courseid : null|int
$extension : string
$eventname : string
$userid : null|int
$origin : string = 'system'
$correlationid : null|string = null
$message : null|string = null
$contextdata : null|array<string, mixed>|string = null
$hasdiff : int = 0
$hassnapshot : int = 0
$timecreated : int = 0

__get()

Magic getter to allow reading protected properties.

public __get(string $name) : mixed
Parameters
$name : string

Property name

__isset()

Magic isset to allow checking protected properties.

public __isset(string $name) : bool
Parameters
$name : string

Property name

Return values
bool

__set()

Magic setter.

public __set(string $name, mixed $value) : void
Parameters
$name : string

Property name

$value : mixed

Value

create()

Factory method for a new audit log entry.

public static 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 ]) : self
Parameters
$extension : string
$eventname : string
$subjectid : int|null = null
$userid : int|null = null
$subjecttype : string = 'item'
$courseid : int|null = null
$subjectkey : string|null = null
$correlationid : string|null = null
$uuid : string|null = null
$timecreated : int|null = null
Return values
self

get_contextdata()

public get_contextdata() : array<string, mixed>
Return values
array<string, mixed>

get_correlationid()

public get_correlationid() : string|null
Return values
string|null

get_courseid()

public get_courseid() : int|null
Return values
int|null

get_eventname()

public get_eventname() : string
Return values
string

get_eventtype()

public get_eventtype() : string
Return values
string

get_extension()

public get_extension() : string
Return values
string

get_id()

public get_id() : int|null
Return values
int|null

get_itemid()

public get_itemid() : int|null
Return values
int|null

get_message()

public get_message() : string|null
Return values
string|null

get_origin()

public get_origin() : string
Return values
string

get_subjectid()

public get_subjectid() : int|null
Return values
int|null

get_subjectkey()

public get_subjectkey() : string|null
Return values
string|null

get_subjecttype()

public get_subjecttype() : string
Return values
string

get_timecreated()

public get_timecreated() : int
Return values
int

get_userid()

public get_userid() : int|null
Return values
int|null

get_uuid()

public get_uuid() : string|null
Return values
string|null

has_diff()

public has_diff() : bool
Return values
bool

has_snapshot()

public has_snapshot() : bool
Return values
bool

jsonSerialize()

Serializes the object to a value that can be natively serialized by json_encode().

public jsonSerialize() : array<string, mixed>
Tags
noinspection

PhpMethodNamingConventionInspection

Return values
array<string, mixed>

to_array()

public to_array() : array<string, mixed>
Return values
array<string, mixed>

with_message()

public with_message(string $message) : self
Parameters
$message : string
Return values
self

        
On this page

Search results