-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_audit_trail.api.php
More file actions
executable file
·56 lines (52 loc) · 1.88 KB
/
Copy pathadmin_audit_trail.api.php
File metadata and controls
executable file
·56 lines (52 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @file
* Documentation for the Admin Audit Trail module.
*/
/**
* Returns event log handlers.
*
* @return array
* An associative array, keyed by event type, and valued by handler info:
* - {string} title
* The title that describes the events logged by this handler.
* This handler's 'form_submit_callback' callback will be notified when a
* form is submitted that has an id as specified in this array. Optional.
* - {array} form_ids_regexp
* The same as form_ids, but instead of identical matches regular
* expressions can be specified.
* - {string} form_submit_callback
* Callback that's called when a form is submitted with a form id as
* specified in form_ids. The callback function profile:
*
* Optional. Notice that events can also be manually created using the
* admin_audit_trail_save function.
*/
function hook_admin_audit_trail_handlers() {
$handlers = [];
return $handlers;
}
/**
* Allows for the altering of the log array.
*
* @param array $log
* The log record to be altered. This record contains the following fields:
* - {string} type
* The event type. This is usually the object type that is described by this
* event. Example: 'node' or 'user'. Required.
* - {string} operation
* The operation being performed. Example: 'insert'. Required.
* - {string} description
* A textual description of the event. Required.
* - {string} ref_numeric
* Reference to numeric id. Optional.
* - {string} ref_char
* Reference to alphabetical id. Optional.
* - {bool} skip_db
* Set to TRUE to prevent the record from being written to the database.
* The record has still been dispatched to every alter implementation, so
* a forwarding module (e.g. Admin Audit Trail Logger) has already
* processed it. Optional.
*/
function hook_admin_audit_trail_log_alter(array &$log) {
}