#68 - refactor some of the notification classes to classes plugin to share them with comments

This commit is contained in:
isUnknown 2024-12-18 15:05:42 +01:00
parent 6ab18b1066
commit 3d4ddc12fc
9 changed files with 22 additions and 105 deletions

View file

@ -0,0 +1,21 @@
<?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 [
"uri" => (string) $this->page->uri(),
"title" => (string) $this->page->title(),
];
}
}