#68 - refactor some of the notification classes to classes plugin to share them with comments
This commit is contained in:
parent
6ab18b1066
commit
3d4ddc12fc
9 changed files with 22 additions and 105 deletions
21
public/site/plugins/classes/location/PageDetails.php
Normal file
21
public/site/plugins/classes/location/PageDetails.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue