#68 - reply working + remove marker on comment delete

This commit is contained in:
isUnknown 2024-12-18 18:22:41 +01:00
parent cf83edc1e6
commit 231bb21a4f
9 changed files with 64 additions and 95 deletions

View file

@ -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;
}