17 private $notificationService;
26 \
Magento\AdminNotification\Model\NotificationService $notificationService =
null 28 parent::__construct($context);
30 ->get(\
Magento\AdminNotification\Model\NotificationService::class);
44 $notificationId = (int)$this->
getRequest()->getPost(
'id');
47 $this->notificationService->markAsRead($notificationId);
48 $responseData[
'success'] =
true;
49 }
catch (\Exception $e) {
50 $responseData[
'success'] =
false;
54 $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
55 $resultJson->setData($responseData);
__construct(Action\Context $context, \Magento\AdminNotification\Model\NotificationService $notificationService=null)