/**
  * Send a notification from the notify tab.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function sendNotification($args, $request)
 {
     $this->setupTemplate($request);
     import('controllers.grid.users.stageParticipant.form.StageParticipantNotifyForm');
     // exists in each app.
     $notifyForm = new StageParticipantNotifyForm($this->getSubmission()->getId(), ASSOC_TYPE_SUBMISSION, $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE));
     $notifyForm->readInputData($request);
     if ($notifyForm->validate()) {
         $noteId = $notifyForm->execute($request);
         // Return a JSON string indicating success
         // (will clear the form on return)
         $this->_logEventAndCreateNotification($request);
         return new JSONMessage(true);
     } else {
         // Return a JSON string indicating failure
         return new JSONMessage(false);
     }
 }
 /**
  * Send a notification from the notify tab.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function sendNotification($args, $request)
 {
     $this->setupTemplate($request);
     import('controllers.grid.users.stageParticipant.form.StageParticipantNotifyForm');
     // exists in each app.
     $notifyForm = new StageParticipantNotifyForm($this->getSubmission()->getId(), ASSOC_TYPE_SUBMISSION, $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE));
     $notifyForm->readInputData($request);
     if ($notifyForm->validate()) {
         $noteId = $notifyForm->execute($request);
         // Return a JSON string indicating success
         // (will clear the form on return)
         $this->_logEventAndCreateNotification($request);
         // Update submission notifications
         $notificationMgr = new NotificationManager();
         $notificationMgr->updateNotification($request, array(NOTIFICATION_TYPE_ASSIGN_COPYEDITOR, NOTIFICATION_TYPE_AWAITING_COPYEDITS, NOTIFICATION_TYPE_ASSIGN_PRODUCTIONUSER, NOTIFICATION_TYPE_AWAITING_REPRESENTATIONS), null, ASSOC_TYPE_SUBMISSION, $this->getSubmission()->getId());
         return new JSONMessage(true);
     } else {
         // Return a JSON string indicating failure
         return new JSONMessage(false);
     }
 }