designtopack/public/site/plugins/classes/location/PageDetails.php
2025-01-23 16:16:51 +01:00

24 lines
No EOL
549 B
PHP

<?php
namespace adrienpayet\D2P\data\location;
use Kirby\Cms\Page;
class PageDetails
{
protected Page $page;
public function __construct(Page $page)
{
$this->page = $page;
}
public function toArray() {
return [
"uuid" => (string) $this->page->uuid(),
"template" => (string) $this->page->template(),
"panelUrl" => (string) $this->page->panel()->url(),
"uri" => (string) $this->page->uri(),
"title" => (string) $this->page->title(),
];
}
}