Invision Community 4.4 has introduced the new AdminCP Notification, which allow you to programmatically send a notification to the admin.
To implement this within your custom application, create the new extension via the ACP Application Developer Center, and then you can send it using the following:
\IPS\core\AdminNotification::send( 'demo', 'Test');
if you want to remove a notification, you can use following code:
\IPS\core\AdminNotification::remove( 'demo', 'Test' );
Similar to the frontend notifications, the send method accepts the following additional parameters
/**
* Send Notification
*
* @param string $app Application key
* @param string $extension Extension key
* @param string|null $extra Any additional information which persists if the notification is resent
* @param bool|null $resend If an existing notification exists, it will be bumped / resent
* @param mixed $extraForEmail Any additional information specific to this instance which is used for the email but not saved
* @param bool|\IPS\Member $bypassEmail If TRUE, no email will be sent, regardless of admin preferences - or if a member object, that admin will be skipped. Should only be used if the action is initiated by an admin making an email unnecessary
* @return void
*/
public static function send( $app, $extension, $extra = NULL, $resend = TRUE, $extraForEmail = NULL, $bypassEmail = FALSE )
Report Document