コード例 #1
0
ファイル: message_area.php プロジェクト: dg711/moodle
 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;
 }