#68 - reply working + remove marker on comment delete
This commit is contained in:
parent
cf83edc1e6
commit
231bb21a4f
9 changed files with 64 additions and 95 deletions
|
|
@ -3,21 +3,20 @@ namespace adrienpayet\comments;
|
|||
|
||||
class Reply extends BaseComment {
|
||||
|
||||
protected $parentId;
|
||||
protected string $type = "comment-reply";
|
||||
|
||||
public function __construct($data) {
|
||||
parent::__construct($data);
|
||||
$this->parentId = $data['parentId'];
|
||||
$this->location->setParentCommentId($data["parentId"]);
|
||||
}
|
||||
|
||||
|
||||
public function parentId() {
|
||||
return $this->parentId;
|
||||
return $this->location->parentId();
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
$array = parent::toArray();
|
||||
$array['parentId'] = $this->parentId;
|
||||
$array['type'] = $this->type;
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue