#68 - finish notification class. Content notification on validate brief working
This commit is contained in:
parent
3fb043210e
commit
fa36c9ef4a
12 changed files with 246 additions and 24 deletions
25
public/site/plugins/notifications/src/Position.php
Normal file
25
public/site/plugins/notifications/src/Position.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace adrienpayet\notifications;
|
||||
|
||||
class Position
|
||||
{
|
||||
public int $pageIndex;
|
||||
public float $x;
|
||||
public float $y;
|
||||
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->pageIndex = $data['pageIndex'];
|
||||
$this->x = (float) $data['x'];
|
||||
$this->y = (float) $data['y'];
|
||||
}
|
||||
|
||||
public function toArray() {
|
||||
return [
|
||||
"pageIndex" => $this->pageIndex,
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue