function getNotificationContents($request, $notification) { return $this->getNotificationMessage($request, $notification); }
/** * Using the notification message, construct, if needed, any additional * content for the notification body. If a specific notification type * is not defined, it will return the parent method return value. * Define a notification type case on this method only if you need to * present more than just text in notification. If you need to define * just a locale key, use the getNotificationMessage method only. * @copydoc PKPNotificationOperationManager::getNotificationContents() */ public function getNotificationContents($request, $notification) { $content = parent::getNotificationContents($request, $notification); $type = $notification->getType(); assert(isset($type)); switch ($type) { case NOTIFICATION_TYPE_FORM_ERROR: $templateMgr = TemplateManager::getManager($request); $templateMgr->assign('errors', $content); return $templateMgr->fetch('controllers/notification/formErrorNotificationContent.tpl'); case NOTIFICATION_TYPE_ERROR: if (is_array($content)) { $templateMgr->assign('errors', $content); return $templateMgr->fetch('controllers/notification/errorNotificationContent.tpl'); } else { return $content; } default: $delegateResult = $this->getByDelegate($notification->getType(), $notification->getAssocType(), $notification->getAssocId(), __FUNCTION__, array($request, $notification)); if ($delegateResult) { $content = $delegateResult; } return $content; } }