You are here

public function OpignoNotificationController::count in Opigno notifications 8

Ajax callback. Returns unread notifications count.

1 string reference to 'OpignoNotificationController::count'
opigno_notification.routing.yml in ./opigno_notification.routing.yml
opigno_notification.routing.yml

File

src/Controller/OpignoNotificationController.php, line 23

Class

OpignoNotificationController
Provides the controller for OpignoNotification entity pages.

Namespace

Drupal\opigno_notification\Controller

Code

public function count() {
  $count = OpignoNotification::unreadCount();
  return new JsonResponse([
    'count' => $count,
  ]);
}