23 $notificationId = (int)$this->
getRequest()->getParam(
'id');
24 if ($notificationId) {
26 $this->_objectManager->create(
27 \
Magento\AdminNotification\Model\NotificationService::class
31 $this->messageManager->addSuccessMessage(
__(
'The message has been marked as Read.'));
32 }
catch (\
Magento\Framework\Exception\LocalizedException $e) {
33 $this->messageManager->addErrorMessage($e->getMessage());
34 }
catch (\Exception $e) {
35 $this->messageManager->addExceptionMessage(
37 __(
"We couldn't mark the notification as Read because of an error.")
_redirect($path, $arguments=[])