24 lines
435 B
PHP
24 lines
435 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace adrienpayet\notifications\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
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|