These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminListBundle\Event; |
||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; |
||
6 | use Symfony\Component\Form\FormInterface; |
||
7 | use Symfony\Component\HttpFoundation\Request; |
||
8 | use Symfony\Component\HttpFoundation\Response; |
||
9 | |||
10 | class AdminListEvent extends Event |
||
11 | { |
||
12 | /** |
||
13 | * @var object |
||
14 | */ |
||
15 | protected $entity; |
||
16 | |||
17 | /** |
||
18 | * @var FormInterface |
||
19 | */ |
||
20 | protected $form; |
||
21 | |||
22 | /** |
||
23 | * @var Request |
||
24 | */ |
||
25 | protected $request; |
||
26 | |||
27 | /** |
||
28 | * @var Response |
||
29 | */ |
||
30 | protected $response; |
||
31 | |||
32 | /** |
||
33 | * AdminListEvent constructor. |
||
34 | * |
||
35 | * @param object $entity |
||
36 | * @param Request $request |
||
37 | * @param FormInterface|null $form |
||
38 | */ |
||
39 | public function __construct($entity, Request $request, FormInterface $form = null) |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
40 | { |
||
41 | $this->entity = $entity; |
||
42 | $this->request = $request; |
||
43 | $this->form = $form; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return object |
||
48 | */ |
||
49 | public function getEntity() |
||
50 | { |
||
51 | return $this->entity; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return Request |
||
56 | */ |
||
57 | public function getRequest() |
||
58 | { |
||
59 | return $this->request; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return FormInterface|null |
||
64 | */ |
||
65 | public function getForm() |
||
66 | { |
||
67 | return $this->form; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return Response |
||
72 | */ |
||
73 | public function getResponse() |
||
74 | { |
||
75 | return $this->response; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * Sets a response and stops event propagation. |
||
80 | * |
||
81 | * @param Response $response |
||
82 | */ |
||
83 | public function setResponse(Response $response) |
||
84 | { |
||
85 | $this->response = $response; |
||
86 | |||
87 | $this->stopPropagation(); |
||
88 | } |
||
89 | } |
||
90 |