#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
|
|
@ -1,24 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace adrienpayet\comments;
|
||||
use adrienpayet\D2P\data\Position;
|
||||
|
||||
class Comment extends BaseComment
|
||||
{
|
||||
protected ?Position $position = null;
|
||||
protected string $type = "comment";
|
||||
protected array $replies = [];
|
||||
|
||||
public function __construct($data) {
|
||||
parent::__construct($data);
|
||||
if (isset($data["position"])) {
|
||||
$this->position = new Position($data['position']);
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
$array = parent::toArray();
|
||||
$array['position'] = $this->position;
|
||||
$array['type'] = $this->type;
|
||||
$array['replies'] = $this->replies;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue