File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ class Page extends Entity
3131 */
3232 protected string $ title = '' ;
3333
34+ /**
35+ * @var string
36+ */
37+ protected string $ url = '' ;
38+
3439 /**
3540 * @var string
3641 */
@@ -101,6 +106,7 @@ private function fillFromRaw(): void
101106 $ this ->fillObjectType ();
102107 $ this ->fillProperties ();
103108 $ this ->fillTitle (); // This has to be called after fillProperties(), since title is provided by properties
109+ $ this ->fillPageUrl ();
104110 $ this ->fillCreatedTime ();
105111 $ this ->fillLastEditedTime ();
106112 }
@@ -151,6 +157,16 @@ private function fillTitle(): void
151157 }
152158 }
153159
160+ /**
161+ *
162+ */
163+ private function fillPageUrl (): void
164+ {
165+ if (Arr::exists ($ this ->responseData , 'url ' )) {
166+ $ this ->url = $ this ->responseData ['url ' ];
167+ }
168+ }
169+
154170 /**
155171 * @param $propertyTitle
156172 * @param $property
@@ -324,6 +340,14 @@ public function getTitle(): string
324340 return $ this ->title ;
325341 }
326342
343+ /**
344+ * @return string
345+ */
346+ public function getUrl (): string
347+ {
348+ return $ this ->url ;
349+ }
350+
327351 /**
328352 * @return Collection
329353 */
You can’t perform that action at this time.
0 commit comments