예제 #1
0
 public function export_for_template(\renderer_base $output)
 {
     $data = new \stdClass();
     $data->userid = $this->userid;
     $contacts = new contacts($this->otheruserid, $this->contacts);
     $data->contacts = $contacts->export_for_template($output);
     $messages = new messages($this->userid, $this->otheruserid, $this->messages);
     $data->messages = $messages->export_for_template($output);
     $data->isconversation = true;
     $data->requestedconversation = $this->requestedconversation;
     return $data;
 }
예제 #2
0
 public function export_for_template(\renderer_base $output)
 {
     $data = new \stdClass();
     $data->userid = $this->userid;
     $contacts = new contacts($this->otheruserid, $this->contacts);
     $data->contacts = $contacts->export_for_template($output);
     if ($this->contactsfirst) {
         // Don't show any messages if we are creating a new message.
         $messages = new messages($this->userid, null, array());
     } else {
         $messages = new messages($this->userid, $this->otheruserid, $this->messages);
     }
     $data->messages = $messages->export_for_template($output);
     $data->isconversation = $this->contactsfirst ? false : true;
     $data->requestedconversation = $this->requestedconversation;
     $data->pollmin = $this->pollmin;
     $data->pollmax = $this->pollmax;
     $data->polltimeout = $this->polltimeout;
     $data->contactsfirst = $this->contactsfirst;
     return $data;
 }