23 lines
430 B
PHP
23 lines
430 B
PHP
<?php
|
|
|
|
namespace adrienpayet\D2P\data\location;
|
|
use Kirby;
|
|
|
|
class ProjectDetails
|
|
{
|
|
public string $title;
|
|
public string $uri;
|
|
|
|
public function __construct(Kirby\Cms\Page $page)
|
|
{
|
|
$this->title = (string) $page->title();
|
|
$this->uri = (string) $page->uri();
|
|
}
|
|
|
|
public function toArray() {
|
|
return [
|
|
"title" => $this->title,
|
|
"uri" => $this->uri
|
|
];
|
|
}
|
|
}
|