Post and Comment small fixes.
This commit is contained in:
parent
11c1f8b6ab
commit
6d10b6dac1
|
@ -344,19 +344,6 @@ class Comment
|
||||||
return $this->deleted;
|
return $this->deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set id
|
|
||||||
*
|
|
||||||
* @param integer $id
|
|
||||||
* @return Comment
|
|
||||||
*/
|
|
||||||
public function setId($id)
|
|
||||||
{
|
|
||||||
$this->id = $id;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add children
|
* Add children
|
||||||
*
|
*
|
||||||
|
|
|
@ -363,6 +363,7 @@ class Post
|
||||||
public function addComment(Comment $comment)
|
public function addComment(Comment $comment)
|
||||||
{
|
{
|
||||||
$this->comments[] = $comment;
|
$this->comments[] = $comment;
|
||||||
|
$comment->setPost($this);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue