Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tool_log\log\manager Class Reference
Inheritance diagram for tool_log\log\manager:
core\log\manager

Public Member Functions

 dispose ()
 Usually called automatically from shutdown manager, this allows us to implement buffering of write operations.
 
 get_readers ($interface=null)
 Returns list of available log readers. More...
 
 get_supported_logstores ($component)
 For a given report, returns a list of log stores that are supported. More...
 
 get_supported_reports ($logstore)
 Get a list of reports that support the given store instance. More...
 
 legacy_add_to_log ($courseid, $module, $action, $url='', $info='', $cm=0, $user=0, $ip=null, $time=null)
 Legacy add_to_log() redirection. More...
 
 process (\core\event\base $event)
 Called from the observer only. More...
 

Static Public Member Functions

static get_store_plugins ()
 Intended for store management, do not use from reports. More...
 

Protected Member Functions

 init ()
 Delayed initialisation of singleton.
 

Protected Attributes

core log reader[] $readers
 $readers list of initialised log readers
 
tool_log log store[] $stores
 $stores list of all enabled stores
 
tool_log log writer[] $writers
 $writers list of initialised log writers
 

Member Function Documentation

◆ get_readers()

tool_log\log\manager::get_readers (   $interface = null)

Returns list of available log readers.

This way the reports find out available sources of data.

Parameters
string$interfaceReturned stores must implement this interface.
Return values
core

Implements core\log\manager.

◆ get_store_plugins()

static tool_log\log\manager::get_store_plugins ( )
static

Intended for store management, do not use from reports.

Return values
store[]Returns list of available store plugins.

◆ get_supported_logstores()

tool_log\log\manager::get_supported_logstores (   $component)

For a given report, returns a list of log stores that are supported.

Parameters
string$componentcomponent.
Return values
false|arraylist of logstores that support the given report. It returns false if the given $component doesn't require logstores.

Implements core\log\manager.

◆ get_supported_reports()

tool_log\log\manager::get_supported_reports (   $logstore)

Get a list of reports that support the given store instance.

Parameters
string$logstoreName of the store.
Return values
arrayList of supported reports

◆ legacy_add_to_log()

tool_log\log\manager::legacy_add_to_log (   $courseid,
  $module,
  $action,
  $url = '',
  $info = '',
  $cm = 0,
  $user = 0,
  $ip = null,
  $time = null 
)

Legacy add_to_log() redirection.

To be used only from deprecated add_to_log() function and event trigger() method.

NOTE: this is hardcoded to legacy log store plugin, hopefully we can get rid of it soon.

Parameters
int$courseidThe course id
string$moduleThe module name e.g. forum, journal, resource, course, user etc
string$action'view', 'update', 'add' or 'delete', possibly followed by another word to clarify
string$urlThe file and parameters used to see the results of the action
string$infoAdditional description information
int$cmThe course_module->id if there is one
int | stdClass$userIf log regards $user other than $USER
string$ipOverride the IP, should only be used for restore.
int$timeOverride the log time, should only be used for restore.

◆ process()

tool_log\log\manager::process ( \core\event\base  $event)

Called from the observer only.

Parameters
core\event\base$event

The documentation for this class was generated from the following file: