Dashboard/Email Notifications

 

Adding and Removing Dashboard and Nightly email Notifications that show up in the FreePBX Dashboard is extremely easy.

 

First Steps

Inside any module simply add:

$nt = notifications::create(); //OR $nt = FreePBX::Notifications();

The only things we need to know is the rawname of our module (in module.xml) and a unique string to identify this notification.

$rawname = 'dahdiconfig'; $uid = 'modprobeconf';

Adding Notifications

Before adding a new notification it is essential for you to check to make sure you aren't adding duplicate notifications.

if($nt->exists($rawname, $uid)) {     //Process add or delete

Notification Types

There are six different types of notifications that can be managed on the dashboard. They all use the same parameters as listed below:

Critical
Security
Update
Error
Warning
Notice

Removing Notifications

Delete

This will forcefully delete a notification, even if $candelete has been set to false

Safe Delete

This won't delete a notification if $candelete was set to false

Return to Documentation Home I Return to Sangoma Support