/
Event.php
48 lines (38 loc) · 903 Bytes
/
Event.php
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
<?php
namespace Pushword\Admin\FormField;
use Sonata\AdminBundle\Admin\AdminInterface;
use Symfony\Contracts\EventDispatcher\Event as SfEvent;
/**
* The order.placed event is dispatched each time an order is created
* in the system.
*/
class Event extends SfEvent
{
/**
* @var string
*/
public const NAME = 'pushword.admin.load_field';
private AdminInterface $admin;
private array $fields;
public function __construct(AdminInterface $admin, array $fields)
{
$this->admin = $admin;
$this->fields = $fields;
}
public function getAdmin(): AdminInterface
{
return $this->admin;
}
/**
* @return mixed[]
*/
public function getFields(): array
{
return $this->fields;
}
public function setFields(array $fields): self
{
$this->fields = $fields;
return $this;
}
}