CodePixel Posted January 14, 2021 Share Posted January 14, 2021 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? Link to comment Share on other sites More sharing options...
Solution bfarber Posted January 15, 2021 Solution Share Posted January 15, 2021 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. When clicking on the "View all notifications" link you get more details, i.e. Link to comment Share on other sites More sharing options...
CodePixel Posted January 15, 2021 Author Share Posted January 15, 2021 So it is not possible? Link to comment Share on other sites More sharing options...
bfarber Posted January 15, 2021 Share Posted January 15, 2021 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 ) 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. CodePixel 1 Link to comment Share on other sites More sharing options...
Recommended Posts