Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Notification API

Notification API: createNotification

Scroll Prev Next More

 

Alternative syntax of addNotification function.

Syntax

createNotification( $params)

Arguments

params

array with parameters. Corresponds to parameters of addNotification function.

$params["message"] - message

$params["title"] - notification title

$params["icon"] - icon

$params["url"] - URL

$params["expire"] - expiration datetime or time in minutes

$params["user"] - user

$params["provider"] - security provider

Return value

No return value

Example

This example shows how to add a notification for all users when a new record added to the Categories table. This code needs to be added to AfterAdd event of the Categories table.

 

createNotification( array( "message" => "New category added: ".$values["CategoryName"] , "title" => "New category", "icon" => "fa-envelope") );  

See also:

About Notification API

Function createNotification

Function makePageLink

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software