forked from ProcessMaker/processmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthClientDeleted.php
More file actions
54 lines (45 loc) · 1008 Bytes
/
AuthClientDeleted.php
File metadata and controls
54 lines (45 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
namespace ProcessMaker\Events;
use Carbon\Carbon;
use Illuminate\Foundation\Events\Dispatchable;
use ProcessMaker\Contracts\SecurityLogEventInterface;
class AuthClientDeleted implements SecurityLogEventInterface
{
use Dispatchable;
private array $data;
private array $changes;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(array $values)
{
$this->changes = $values;
}
/**
* Return event data
*/
public function getData(): array
{
return [
'auth_client_id' => $this->changes['id'] ?? 0,
'name' => $this->changes['name'] ?? 0,
'deleted_at' => Carbon::now(),
];
}
/**
* Return event changes
*/
public function getChanges(): array
{
return $this->changes;
}
/**
* return event name
*/
public function getEventName(): string
{
return 'AuthClientDeleted';
}
}