dolibarr  20.0.0-beta
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
InterfaceLogevents Class Reference

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

Inheritance diagram for InterfaceLogevents:
Inheritance graph
[legend]
Collaboration diagram for InterfaceLogevents:
Collaboration graph
[legend]

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

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

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 66 of file interface_20_all_Logevents.class.php.

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 142 of file interface_20_all_Logevents.class.php.

References $object, and dol_now().

◆ 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 165 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 91 of file interface_20_all_Logevents.class.php.


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