1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* (c) FSi sp. z o.o. <[email protected]> |
5
|
|
|
* |
6
|
|
|
* For the full copyright and license information, please view the LICENSE |
7
|
|
|
* file that was distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace FSi\Bundle\AdminBundle\Event; |
11
|
|
|
|
12
|
|
|
use FSi\Bundle\AdminBundle\Admin\Element; |
13
|
|
|
use Symfony\Component\EventDispatcher\Event; |
14
|
|
|
use Symfony\Component\HttpFoundation\Request; |
15
|
|
|
|
16
|
|
|
class BatchEvent extends Event |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var \FSi\Bundle\AdminBundle\Admin\Element |
20
|
|
|
*/ |
21
|
|
|
private $element; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var \Symfony\Component\HttpFoundation\Request |
25
|
|
|
*/ |
26
|
|
|
private $request; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var object |
30
|
|
|
*/ |
31
|
|
|
private $object; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var boolean |
35
|
|
|
*/ |
36
|
|
|
private $skipElement = false; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var boolean |
40
|
|
|
*/ |
41
|
|
|
private $abort = false; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @param \FSi\Bundle\AdminBundle\Admin\Element $element |
45
|
|
|
* @param \Symfony\Component\HttpFoundation\Request $request |
46
|
|
|
* @param object $object |
47
|
|
|
*/ |
48
|
|
|
public function __construct(Element $element, Request $request, $object) |
|
|
|
|
49
|
|
|
{ |
50
|
|
|
$this->element = $element; |
51
|
|
|
$this->request = $request; |
52
|
|
|
$this->object = $object; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @return \FSi\Bundle\AdminBundle\Admin\Element |
57
|
|
|
*/ |
58
|
|
|
public function getElement() |
59
|
|
|
{ |
60
|
|
|
return $this->element; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return \Symfony\Component\HttpFoundation\Request |
65
|
|
|
*/ |
66
|
|
|
public function getRequest() |
67
|
|
|
{ |
68
|
|
|
return $this->request; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return object |
73
|
|
|
*/ |
74
|
|
|
public function getObject() |
75
|
|
|
{ |
76
|
|
|
return $this->object; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @return boolean |
81
|
|
|
*/ |
82
|
|
|
public function getSkipElement() |
83
|
|
|
{ |
84
|
|
|
return $this->skipElement; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @param boolean $skipElement |
89
|
|
|
*/ |
90
|
|
|
public function setSkipElement($skipElement) |
91
|
|
|
{ |
92
|
|
|
$this->skipElement = $skipElement; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return boolean |
97
|
|
|
*/ |
98
|
|
|
public function getAbort() |
99
|
|
|
{ |
100
|
|
|
return $this->abort; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @param boolean $abort |
105
|
|
|
*/ |
106
|
|
|
public function setAbort($abort) |
107
|
|
|
{ |
108
|
|
|
$this->abort = $abort; |
109
|
|
|
} |
110
|
|
|
} |
111
|
|
|
|