No Matches
BxDolAlerts Class Reference
Inheritance diagram for BxDolAlerts:

Public Member Functions

 __construct ($sUnit, $sAction, $iObjectId, $iSender=false, $aExtras=array())
 alert ()
 getAlertsData ()

Static Public Member Functions

static cacheInvalidate ()

Public Attributes


Protected Attributes


Static Protected Attributes

static $_aCacheData

Detailed Description

Alert/Handler/Hooks engine.

Is needed to fire some alert(event) in one place and caught it with a handler somewhere else.

Related classes: BxDolAlertsResponse - abstract class for all response classes.

Example of usage:

First Fire an alert

$oZ = new BxDolAlerts('unit_name', 'action', 'object_id', 'sender_id', array('of_extra_params'));
Definition BxDolAlerts.php:39


bx_alert('unit_name', 'action', 'object_id', 'sender_id', ['extra', 'params']);
bx_alert($sUnit, $sAction, $iObjectId, $iSender=false, $aExtras=array())
Definition utils.inc.php:1872

Second Add handler and caught alert(s) a. Create Response class by extending BxDolAlertsResponse class. It should process all necessary alerts which are passed to it.
b. Register your handler in the database by adding it in sys_alerts_handlers table.
c. Associate necessary alerts with the handler by adding them in the sys_alerts table.

Constructor & Destructor Documentation

◆ __construct()

BxDolAlerts::__construct ( $sUnit,
$iSender = false,
$aExtras = array() )


string$sType- system type
string$sAction- system action
int$iObjectId- object id
int$iSenderId- sender (action's author) profile id, if it is false - then currectly logged in profile id is used

Member Function Documentation

◆ alert()

BxDolAlerts::alert ( )

Notifies the necessary handlers about the alert.

◆ getAlertsData()

BxDolAlerts::getAlertsData ( )

Cache alerts and handlers.

an array with all alerts and handlers.

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