Example #1
0
 /**
  * Build the message text
  *
  * @param $row
  *
  * @return mixed|string
  * @throws Exception
  */
 private function _thisMsg($row)
 {
     list($phpMsg, $message) = $this->_message();
     $w = new FabrikWorker();
     $input = $this->app->input;
     $coverMessage = nl2br($input->get('message', '', 'html'));
     $emailTemplate = $this->_emailTemplate();
     $oldStyle = $this->_oldStyle();
     if ($oldStyle) {
         $thisMsg = $w->parseMessageForPlaceHolder($coverMessage, $row);
     } else {
         if ($phpMsg) {
             $thisMsg = FabrikHelperHTML::getPHPTemplate($emailTemplate, $row, $this->listModel);
         } else {
             $thisMsg = $w->parseMessageForPlaceHolder($message, $row);
         }
     }
     return $thisMsg;
 }