Esempio n. 1
0
 /**
  * @param ChildComment $comment The ChildComment object to add.
  */
 protected function doAddComment(ChildComment $comment)
 {
     $this->collComments[] = $comment;
     $comment->setNote($this);
 }
Esempio n. 2
0
 protected function comment($id)
 {
     //TODO: check rights
     $note = NoteQuery::create()->findPK($id);
     $comment = new Comment();
     $comment->setUser($this->params['user']);
     $comment->setNote($note);
     $comment->setText($_POST['msg']);
     $comment->save();
     $this->params['comments'] = $note->getComments();
     $this->renderType('js.phtml');
 }