[TASK] Un-deprecation log entries for ext:belog
[Packages/TYPO3.CMS.git] / typo3 / sysext / belog / Classes / Domain / Model / Constraint.php
1 <?php
2 namespace TYPO3\CMS\Belog\Domain\Model;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Constraints for log entries
19 */
20 class Constraint extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
21
22 /**
23 * Selected user/group; possible values are "gr-<uid>" for a group, "us-<uid>" for a user or -1 for "all users"
24 *
25 * @var string
26 */
27 protected $userOrGroup = '0';
28
29 /**
30 * Number of log rows to show
31 *
32 * @var int
33 */
34 protected $number = 20;
35
36 /**
37 * UID of selected workspace
38 *
39 * @var int
40 */
41 protected $workspaceUid = \TYPO3\CMS\Belog\Domain\Model\Workspace::UID_ANY_WORKSPACE;
42
43 /**
44 * Selected time frame
45 *
46 * @var int
47 */
48 protected $timeFrame = 0;
49
50 /**
51 * Selected action
52 *
53 * @var int
54 */
55 protected $action = 0;
56
57 /**
58 * Whether rows should be grouped by page
59 *
60 * @var bool
61 */
62 protected $groupByPage = FALSE;
63
64 /**
65 * Calculated start timestamp
66 *
67 * @var int
68 */
69 protected $startTimestamp = 0;
70
71 /**
72 * Calculated end timestamp
73 *
74 * @var int
75 */
76 protected $endTimestamp = 0;
77
78 /**
79 * Manual date start
80 * @var \DateTime
81 */
82 protected $manualDateStart = NULL;
83
84 /**
85 * Manual date stop
86 * @var \DateTime
87 */
88 protected $manualDateStop = NULL;
89
90 /**
91 * Whether the plugin is called in page context (submodule of Web > Info)
92 *
93 * @var bool
94 */
95 protected $isInPageContext = FALSE;
96
97 /**
98 * Selected page ID in page context
99 *
100 * @var int
101 */
102 protected $pageId = 0;
103
104 /**
105 * Page level depth
106 *
107 * @var int
108 */
109 protected $depth = 0;
110
111 /**
112 * Default constructor
113 */
114 public function __construct() {
115
116 }
117
118 /**
119 * added to prevent the deprecation message
120 * in Extbase\DomainObject\AbstractDomainObject
121 *
122 * @todo the constraints model needs another way of storing
123 * persisted search data than serialisation
124 */
125 public function __wakeup() {
126 }
127
128 /**
129 * Set user
130 *
131 * @param string $user
132 * @return void
133 */
134 public function setUserOrGroup($user) {
135 $this->userOrGroup = $user;
136 }
137
138 /**
139 * Get user
140 *
141 * @return string
142 */
143 public function getUserOrGroup() {
144 return $this->userOrGroup;
145 }
146
147 /**
148 * Set number of log rows to show
149 *
150 * @param int $number
151 * @return void
152 */
153 public function setNumber($number) {
154 $this->number = (int)$number;
155 }
156
157 /**
158 * Get number of log entries to show
159 *
160 * @return int
161 */
162 public function getNumber() {
163 return $this->number;
164 }
165
166 /**
167 * Set workspace
168 *
169 * @param string $workspace
170 * @return void
171 */
172 public function setWorkspaceUid($workspace) {
173 $this->workspaceUid = $workspace;
174 }
175
176 /**
177 * Get workspace
178 *
179 * @return string
180 */
181 public function getWorkspaceUid() {
182 return $this->workspaceUid;
183 }
184
185 /**
186 * Set time frame
187 *
188 * @param int $timeFrame
189 * @return void
190 */
191 public function setTimeFrame($timeFrame) {
192 $this->timeFrame = $timeFrame;
193 }
194
195 /**
196 * Get time frame
197 *
198 * @return int
199 */
200 public function getTimeFrame() {
201 return (int)$this->timeFrame;
202 }
203
204 /**
205 * Set action
206 *
207 * @param int $action
208 * @return void
209 */
210 public function setAction($action) {
211 $this->action = $action;
212 }
213
214 /**
215 * Get action
216 *
217 * @return int
218 */
219 public function getAction() {
220 return (int)$this->action;
221 }
222
223 /**
224 * Set group by page
225 *
226 * @param bool $groupByPage
227 * @return void
228 */
229 public function setGroupByPage($groupByPage) {
230 $this->groupByPage = $groupByPage;
231 }
232
233 /**
234 * Get group by page
235 *
236 * @return bool
237 */
238 public function getGroupByPage() {
239 return (bool)$this->groupByPage;
240 }
241
242 /**
243 * Set calculated start timestamp from query constraints
244 *
245 * @param int $timestamp
246 * @return void
247 */
248 public function setStartTimestamp($timestamp) {
249 $this->startTimestamp = (int)$timestamp;
250 }
251
252 /**
253 * Get calculated start timestamp from query constraints
254 *
255 * @return int
256 */
257 public function getStartTimestamp() {
258 return $this->startTimestamp;
259 }
260
261 /**
262 * Set calculated end timestamp from query constraints
263 *
264 * @param int $timestamp
265 * @return void
266 */
267 public function setEndTimestamp($timestamp) {
268 $this->endTimestamp = (int)$timestamp;
269 }
270
271 /**
272 * Get calculated end timestamp from query constraints
273 *
274 * @return int
275 */
276 public function getEndTimestamp() {
277 return $this->endTimestamp;
278 }
279
280 /**
281 * Set page context
282 *
283 * @param bool $pageContext
284 * @return void
285 */
286 public function setIsInPageContext($pageContext) {
287 $this->isInPageContext = $pageContext;
288 }
289
290 /**
291 * Get page context
292 *
293 * @return bool
294 */
295 public function getIsInPageContext() {
296 return (bool)$this->isInPageContext;
297 }
298
299 /**
300 * Set page id
301 *
302 * @param int $id
303 * @return void
304 */
305 public function setPageId($id) {
306 $this->pageId = (int)$id;
307 }
308
309 /**
310 * Get page id
311 *
312 * @return int
313 */
314 public function getPageId() {
315 return $this->pageId;
316 }
317
318 /**
319 * Set page level depth
320 *
321 * @param int $depth
322 * @return void
323 */
324 public function setDepth($depth) {
325 $this->depth = $depth;
326 }
327
328 /**
329 * Get page level depth
330 *
331 * @return int
332 */
333 public function getDepth() {
334 return (int)$this->depth;
335 }
336
337 /**
338 * Set manual date start
339 *
340 * @param \DateTime $manualDateStart
341 * @return void
342 */
343 public function setManualDateStart(\DateTime $manualDateStart = NULL) {
344 $this->manualDateStart = $manualDateStart;
345 }
346
347 /**
348 * Get manual date start
349 *
350 * @return \DateTime
351 */
352 public function getManualDateStart() {
353 return $this->manualDateStart;
354 }
355
356 /**
357 * Set manual date stop
358 *
359 * @param \DateTime $manualDateStop
360 * @return void
361 */
362 public function setManualDateStop(\DateTime $manualDateStop = NULL) {
363 $this->manualDateStop = $manualDateStop;
364 }
365
366 /**
367 * Get manual date stop
368 *
369 * @return \DateTime
370 */
371 public function getManualDateStop() {
372 return $this->manualDateStop;
373 }
374 }