/** * Queues a new SMS Message to be sent out * @param Group $objGroup * @param Login $objLogin * @param string $strSubject can be null/blank * @param string $strBody * @return SmsMessage the queued message that has been queued */ public static function QueueSmsForGroup(Group $objGroup, Login $objLogin, $strSubject, $strBody) { $objSmsMessage = new SmsMessage(); $objSmsMessage->Group = $objGroup; $objSmsMessage->Login = $objLogin; $objSmsMessage->Subject = trim($strSubject); $objSmsMessage->Body = trim($strBody); $objSmsMessage->DateQueued = QDateTime::Now(); $objSmsMessage->Save(); return $objSmsMessage; }