Example #1
0
 public function handleErrorSend()
 {
     $this->message = new Message();
     if ($this->getRequestParameter('parent_id') != null) {
         $parent = MessagePeer::retrieveByUUID($this->getRequestParameter('message'));
         $this->forward404Unless($parent);
         $message = $parent->generateReplyMessage();
         $this->message = $message;
         $this->recipientUsername = $message->getSfGuardUserRelatedByRecipientId()->getProfile()->getFullName();
     }
     $this->setTemplate('compose');
     return sfView::SUCCESS;
 }
Example #2
0
 public static function retrieveThread($id)
 {
     $messages = array();
     $message = MessagePeer::retrieveByPK($id);
     while ($message != null) {
         $messages[] = $message;
         $message = MessagePeer::retrieveByUUID($message->getParentId());
     }
     return array_reverse($messages);
 }