dolibarr 21.0.0-beta
InterfaceLogevents Class Reference

Class of triggers for security audit events. More...

Inheritance diagram for InterfaceLogevents:
Collaboration diagram for InterfaceLogevents:

Public Member Functions

 __construct (DoliDB $db)
 Constructor.
 
 runTrigger ($action, $object, User $user, Translate $langs, Conf $conf)
 Function called when a Dolibarr security audit event is done.
 
- Public Member Functions inherited from DolibarrTriggers
 getName ()
 Returns the name of the trigger file.
 
 getDesc ()
 Returns the description of trigger file.
 
 getVersion ()
 Returns the version of the trigger file.
 
 setErrorsFromObject (CommonObject $object)
 setErrorsFromObject
 

Static Public Member Functions

static isEventActionTextKey ($event_text)
 Check if text contains an event action key.
 

Private Member Functions

 initEventData ($key_text, $object)
 Method called by runTrigger to initialize date, label & description data for event.
 

Detailed Description

Class of triggers for security audit events.

Definition at line 33 of file interface_20_all_Logevents.class.php.

Constructor & Destructor Documentation

◆ __construct()

InterfaceLogevents::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Reimplemented from DolibarrTriggers.

Definition at line 68 of file interface_20_all_Logevents.class.php.

References description.

Member Function Documentation

◆ initEventData()

InterfaceLogevents::initEventData ( $key_text,
$object )
private

Method called by runTrigger to initialize date, label & description data for event.

Parameters
string$key_textAction string
Object$objectObject
Returns
void

Definition at line 147 of file interface_20_all_Logevents.class.php.

References $object, and dol_now().

Referenced by runTrigger().

◆ isEventActionTextKey()

static InterfaceLogevents::isEventActionTextKey ( $event_text)
static

Check if text contains an event action key.

Used for dynamic localization on frontend events list.

Parameters
string$event_textInput event text
Returns
bool True if event text is a coded structured string

Definition at line 170 of file interface_20_all_Logevents.class.php.

◆ runTrigger()

InterfaceLogevents::runTrigger ( $action,
$object,
User $user,
Translate $langs,
Conf $conf )

Function called when a Dolibarr security audit event is done.

All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)

Parameters
string$actionEvent action code
Object$objectObject
User$userObject user
Translate$langsObject langs
conf$confObject conf
Returns
int if KO: <0, if no trigger ran: 0, if OK: >0
Exceptions
Exceptiondol_syslog can throw Exceptions

Reimplemented from DolibarrTriggers.

Definition at line 93 of file interface_20_all_Logevents.class.php.

References $conf, $object, dol_syslog(), getDolGlobalString(), initEventData(), and name.


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