Completed
Push — dev ( a1297d...02942d )
by Arnaud
03:36
created

ActionConfiguration::getPager()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace LAG\AdminBundle\Admin\Configuration;
4
5
6
class ActionConfiguration
7
{
8
    protected $route;
9
10
    protected $parameters;
11
12
    protected $loadStrategy;
13
14
    protected $exports;
15
16
    protected $order;
17
18
    protected $target;
19
20
    protected $icon;
21
22
    protected $batch;
23
24
    /**
25
     * Indicate which pager should be used. If null, no pager will be used.
26
     *
27
     * @var string
28
     */
29
    protected $pager;
30
31
    /**
32
     * Action criteria. Entities will be filtered by thoses criteria.
33
     *
34
     * @var array
35
     */
36
    protected $criteria;
37
38
    /**
39
     * ActionConfiguration constructor.
40
     *
41
     * @param array $configuration
42
     */
43 1
    public function __construct(array $configuration)
44
    {
45 1
        $this->loadStrategy = $configuration['load_strategy'];
46 1
        $this->route = $configuration['route'];
47 1
        $this->parameters = $configuration['parameters'];
48 1
        $this->exports = $configuration['export'];
49 1
        $this->order = $configuration['order'];
50 1
        $this->target = $configuration['target'];
51 1
        $this->icon = $configuration['icon'];
52 1
        $this->batch = $configuration['batch'];
53 1
        $this->pager = $configuration['pager'];
54 1
        $this->criteria = $configuration['criteria'];
55 1
    }
56
57
    /**
58
     * @return mixed
59
     */
60
    public function getRoute()
61
    {
62
        return $this->route;
63
    }
64
65
    /**
66
     * @param mixed $route
67
     */
68
    public function setRoute($route)
69
    {
70
        $this->route = $route;
71
    }
72
73
    /**
74
     * @return mixed
75
     */
76
    public function getParameters()
77
    {
78
        return $this->parameters;
79
    }
80
81
    /**
82
     * @param mixed $parameters
83
     */
84
    public function setParameters($parameters)
85
    {
86
        $this->parameters = $parameters;
87
    }
88
89
    /**
90
     * @return mixed
91
     */
92 1
    public function getLoadStrategy()
93
    {
94 1
        return $this->loadStrategy;
95
    }
96
97
    /**
98
     * @param mixed $loadStrategy
99
     */
100
    public function setLoadStrategy($loadStrategy)
101
    {
102
        $this->loadStrategy = $loadStrategy;
103
    }
104
105
    /**
106
     * @return mixed
107
     */
108
    public function getExports()
109
    {
110
        return $this->exports;
111
    }
112
113
    /**
114
     * @param mixed $exports
115
     */
116
    public function setExports($exports)
117
    {
118
        $this->exports = $exports;
119
    }
120
121
    /**
122
     * @return mixed
123
     */
124
    public function getOrder()
125
    {
126
        return $this->order;
127
    }
128
129
    /**
130
     * @param mixed $order
131
     */
132
    public function setOrder($order)
133
    {
134
        $this->order = $order;
135
    }
136
137
    /**
138
     * @return mixed
139
     */
140
    public function getTarget()
141
    {
142
        return $this->target;
143
    }
144
145
    /**
146
     * @param mixed $target
147
     */
148
    public function setTarget($target)
149
    {
150
        $this->target = $target;
151
    }
152
153
    /**
154
     * @return mixed
155
     */
156
    public function getIcon()
157
    {
158
        return $this->icon;
159
    }
160
161
    /**
162
     * @param mixed $icon
163
     */
164
    public function setIcon($icon)
165
    {
166
        $this->icon = $icon;
167
    }
168
169
    /**
170
     * @return mixed
171
     */
172
    public function getBatch()
173
    {
174
        return $this->batch;
175
    }
176
177
    /**
178
     * @param mixed $batch
179
     */
180
    public function setBatch($batch)
181
    {
182
        $this->batch = $batch;
183
    }
184
185
    /**
186
     * Return which pager should be used for this action. If null, pager is not required.
187
     *
188
     * @return string
189
     */
190 1
    public function getPager()
191
    {
192 1
        return $this->pager;
193
    }
194
195
    /**
196
     * Return action critera.
197
     *
198
     * @return array
199
     */
200 1
    public function getCriteria()
201
    {
202 1
        return $this->criteria;
203
    }
204
205
206
}
207