Ejemplo n.º 1
0
 public function getReceiver()
 {
     if (!isset($this->_receiver)) {
         $Receivers = Zwe_Model_MessageReceiver::getReceiversFromIDMessage($this->IDParent);
         $this->_receiver = array();
         foreach ($Receivers as $Receiver) {
             $this->_receiver[] = Zwe_Model_User::getUserById($Receiver->IDUser);
         }
     }
     return $this->_receiver;
 }
Ejemplo n.º 2
0
 /**
  * L'action per visualizzare i messaggi di una conversazione.
  */
 public function viewAction()
 {
     $IDMessage = $this->_getParam('message');
     $this->view->form = new App_Form_Messages_Reply();
     $this->view->form->getElement('parent')->setValue($IDMessage);
     if ($this->getRequest()->isPost()) {
         if ($this->view->form->isValid($this->getRequest()->getPost())) {
             Zwe_Model_Message::replyMessage($this->view->form->getValue('parent'), $this->view->form->getValue('text'));
         }
     }
     $this->view->messages = Zwe_Model_Page_Messages::getConversation($IDMessage);
     $this->view->receivers = Zwe_Model_MessageReceiver::getReceiversFromIDMessage($IDMessage);
 }