I am not sure where I go wrong as I have almost stripped all functionality. When I trigger a createEvent the icon on the top-right shows a "1" of new notification but when I click on it, it will only show old notifications. The counter gets cleared and I need to trigger a new notification. My presentation model looks like
<?php
class EchoDemoPresentationModel extends EchoEventPresentationModel
{
public function getIconType() {
return 'edit';
}
public function getPrimaryLink() {
return false;
}
}
(Jup fully stripped it)
and the onBeforeCreateEvent looks like
public static function onBeforeCreateEchoEvent(
&$notifications, &$notificationCategories, &$icons
) {
$notificationCategories['demo-notif'] = [
'priority' => 3,
'tooltip' => 'echo-pref-tooltip-demo-notif',
];
$notifications['demo-notif'] = [
'category' => 'demo-notif',
'group' => 'positive',
'section' => 'local',
'presentation-model' => EchoDemoPresentationModel::class,
'bundle' => [
'web' => true,
'expandable' => true,
],
];
}
This results in a https://i.imgur.com/XPDGtOU.png when I trigger an createEvent.
Is there any boilerplate demo I can use? I followed the tutorial on the page but this didn't help.