diff --git a/src/Entities/Page.php b/src/Entities/Page.php index d0aa80e..9626e0e 100644 --- a/src/Entities/Page.php +++ b/src/Entities/Page.php @@ -31,6 +31,11 @@ class Page extends Entity */ protected string $title = ''; + /** + * @var string + */ + protected string $url = ''; + /** * @var string */ @@ -101,6 +106,7 @@ private function fillFromRaw(): void $this->fillObjectType(); $this->fillProperties(); $this->fillTitle(); // This has to be called after fillProperties(), since title is provided by properties + $this->fillPageUrl(); $this->fillCreatedTime(); $this->fillLastEditedTime(); } @@ -151,6 +157,16 @@ private function fillTitle(): void } } + /** + * + */ + private function fillPageUrl(): void + { + if (Arr::exists($this->responseData, 'url')) { + $this->url = $this->responseData['url']; + } + } + /** * @param $propertyTitle * @param $property @@ -324,6 +340,14 @@ public function getTitle(): string return $this->title; } + /** + * @return string + */ + public function getUrl(): string + { + return $this->url; + } + /** * @return Collection */