Jump to content

sending multiple \IPS\core\AdminNotification


Go to solution Solved by bfarber,

Recommended Posts

Posted

Hello, is there a way to send multiple notifications from one extension module? For example, i have admin module to add updates in external database, i want to add AdminNotification every time an update is created, but for now i can only send one notification or remove old one and then send new one but is there a way to send multiple notifications using one module?

 

  • Solution
Posted

For AdminCP notifications we would not recommend sending multiple of one instance (or trying to), but rather following the pattern we use of grouping the notifications appropriately.

image.png

 

image.png

 

 

When clicking on the "View all notifications" link you get more details, i.e.

 

image.png

Posted

Yes it is possible. As long as $extra is a different value here, it will register as a new notification

public static function send( $app, $extension, $extra = NULL, $resend = TRUE, $extraForEmail = NULL, $bypassEmail = FALSE )

image.png

That said, it's typically best to follow established paradigms where possible. We may, for instance, make a change in the future that disallows this ability.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...