#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
23
public/site/plugins/classes/location/ProjectDetails.php
Normal file
23
public/site/plugins/classes/location/ProjectDetails.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?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
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue