comments working

This commit is contained in:
isUnknown 2025-01-15 14:18:48 +01:00
parent 375bed1d01
commit 0b472988a2
14 changed files with 107 additions and 59 deletions

View file

@ -5,16 +5,16 @@ namespace adrienpayet\D2P\data\location;
class Location
{
protected PageDetails $page;
protected ?string $dialogUri = null;
protected ProjectDetails $project;
// protected ?string $dialogUri = null;
// protected ProjectDetails $project;
protected ?FileDetails $file = null;
protected ?array $parent = null;
public function __construct(array $data)
{
$this->page = new PageDetails($data["page"]);
$this->dialogUri = $data["dialogUri"];
$this->project = new ProjectDetails($data["project"]);
// $this->dialogUri = $data["dialogUri"];
// $this->project = new ProjectDetails($data["project"]);
if (isset($data['file'])) {
$this->file = new FileDetails($data["file"]);
@ -33,12 +33,12 @@ class Location
public function toArray() {
$array = [
"page" => $this->page->toArray(),
"project" => $this->project->toArray(),
// "project" => $this->project->toArray(),
];
if ($this->dialogUri) {
$array["dialogUri"] = $this->dialogUri;
}
// if ($this->dialogUri) {
// $array["dialogUri"] = $this->dialogUri;
// }
if ($this->file) {
$array["file"] = $this->file;