‪TYPO3CMS  10.4
LogEntry.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
28 {
34  protected ‪$pid = 0;
35 
45  protected ‪$backendUserUid = 0;
46 
52  protected ‪$action = 0;
53 
59  protected ‪$recordUid = 0;
60 
66  protected ‪$tableName = 0;
67 
73  protected ‪$recordPid = 0;
74 
80  protected ‪$error = 0;
81 
87  protected ‪$details = '';
88 
94  protected ‪$tstamp = 0;
95 
101  protected ‪$type = 0;
102 
108  protected ‪$detailsNumber = 0;
109 
115  protected ‪$ip = '';
116 
122  protected ‪$logData = '';
123 
129  protected ‪$eventPid = 0;
130 
136  protected ‪$workspaceUid = 0;
137 
143  protected ‪$newId = 0;
144 
150  public function ‪setBackendUserUid($beUserUid)
151  {
152  $this->backendUserUid = $beUserUid;
153  }
154 
160  public function ‪getBackendUserUid()
161  {
163  }
164 
170  public function ‪setAction(‪$action)
171  {
172  $this->action = ‪$action;
173  }
174 
180  public function ‪getAction()
181  {
182  return (int)‪$this->action;
183  }
184 
190  public function ‪setRecordUid(‪$recordUid)
191  {
192  $this->recordUid = ‪$recordUid;
193  }
194 
200  public function ‪getRecordUid()
201  {
202  return (int)‪$this->recordUid;
203  }
204 
210  public function ‪setTableName(‪$tableName)
211  {
212  $this->tableName = ‪$tableName;
213  }
214 
220  public function ‪getTableName()
221  {
222  return ‪$this->tableName;
223  }
224 
230  public function ‪setRecordPid(‪$recordPid)
231  {
232  $this->recordPid = ‪$recordPid;
233  }
234 
240  public function ‪getRecordPid()
241  {
242  return (int)‪$this->recordPid;
243  }
244 
250  public function ‪setError(‪$error)
251  {
252  $this->error = ‪$error;
253  }
254 
260  public function ‪getError()
261  {
262  return (int)‪$this->error;
263  }
264 
270  public function ‪getErrorIconClass(): string
271  {
272  switch ($this->‪getError()) {
273  case 1:
274  return 'status-dialog-warning';
275  case 2:
276  case 3:
277  return 'status-dialog-error';
278  default:
279  return 'empty-empty';
280  }
281  }
282 
288  public function ‪setDetails(‪$details)
289  {
290  $this->details = ‪$details;
291  }
292 
298  public function ‪getDetails()
299  {
300  if ($this->type === 255) {
301  return str_replace('###IP###', $this->ip, $this->details);
302  }
303  return ‪$this->details;
304  }
305 
311  public function ‪setTstamp(‪$tstamp)
312  {
313  $this->tstamp = ‪$tstamp;
314  }
315 
321  public function ‪getTstamp()
322  {
323  return (int)‪$this->tstamp;
324  }
325 
331  public function ‪setType(‪$type)
332  {
333  $this->type = ‪$type;
334  }
335 
341  public function ‪getType()
342  {
343  return (int)‪$this->type;
344  }
345 
351  public function ‪setDetailsNumber(‪$detailsNumber)
352  {
353  $this->detailsNumber = ‪$detailsNumber;
354  }
355 
361  public function ‪getDetailsNumber()
362  {
363  return (int)‪$this->detailsNumber;
364  }
365 
371  public function ‪setIp(‪$ip)
372  {
373  $this->ip = ‪$ip;
374  }
375 
381  public function ‪getIp()
382  {
383  return ‪$this->ip;
384  }
385 
391  public function ‪setLogData(‪$logData)
392  {
393  $this->logData = ‪$logData;
394  }
395 
401  public function ‪getLogData()
402  {
403  if ($this->logData === '') {
404  return [];
405  }
406  ‪$logData = @unserialize($this->logData);
407  if (!is_array(‪$logData)) {
408  ‪$logData = [];
409  }
410  return ‪$logData;
411  }
412 
418  public function ‪setEventPid(‪$eventPid)
419  {
420  $this->eventPid = ‪$eventPid;
421  }
422 
428  public function ‪getEventPid()
429  {
430  return (int)‪$this->eventPid;
431  }
432 
438  public function ‪setWorkspaceUid(‪$workspaceUid)
439  {
440  $this->workspaceUid = ‪$workspaceUid;
441  }
442 
448  public function ‪getWorkspaceUid()
449  {
450  return (int)‪$this->workspaceUid;
451  }
452 
458  public function ‪setNewId(‪$newId)
459  {
460  $this->newId = ‪$newId;
461  }
462 
468  public function ‪getNewId()
469  {
470  return ‪$this->newId;
471  }
472 }
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$workspaceUid
‪int $workspaceUid
Definition: LogEntry.php:121
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setType
‪setType($type)
Definition: LogEntry.php:315
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setRecordPid
‪setRecordPid($recordPid)
Definition: LogEntry.php:214
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getRecordUid
‪int getRecordUid()
Definition: LogEntry.php:184
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getType
‪int getType()
Definition: LogEntry.php:325
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getEventPid
‪int getEventPid()
Definition: LogEntry.php:412
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$detailsNumber
‪int $detailsNumber
Definition: LogEntry.php:97
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$backendUserUid
‪int $backendUserUid
Definition: LogEntry.php:43
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setAction
‪setAction($action)
Definition: LogEntry.php:154
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getError
‪int getError()
Definition: LogEntry.php:244
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setTableName
‪setTableName($tableName)
Definition: LogEntry.php:194
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getBackendUserUid
‪int getBackendUserUid()
Definition: LogEntry.php:144
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setEventPid
‪setEventPid($eventPid)
Definition: LogEntry.php:402
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$action
‪int $action
Definition: LogEntry.php:49
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setBackendUserUid
‪setBackendUserUid($beUserUid)
Definition: LogEntry.php:134
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$recordPid
‪int $recordPid
Definition: LogEntry.php:67
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$ip
‪string $ip
Definition: LogEntry.php:103
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$logData
‪string $logData
Definition: LogEntry.php:109
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getRecordPid
‪int getRecordPid()
Definition: LogEntry.php:224
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$type
‪int $type
Definition: LogEntry.php:91
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setNewId
‪setNewId($newId)
Definition: LogEntry.php:442
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getLogData
‪array getLogData()
Definition: LogEntry.php:385
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setDetails
‪setDetails($details)
Definition: LogEntry.php:272
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$eventPid
‪int $eventPid
Definition: LogEntry.php:115
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setLogData
‪setLogData($logData)
Definition: LogEntry.php:375
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$newId
‪string $newId
Definition: LogEntry.php:127
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getDetails
‪string getDetails()
Definition: LogEntry.php:282
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$tableName
‪string $tableName
Definition: LogEntry.php:61
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getErrorIconClass
‪string getErrorIconClass()
Definition: LogEntry.php:254
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setDetailsNumber
‪setDetailsNumber($detailsNumber)
Definition: LogEntry.php:335
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getTstamp
‪int getTstamp()
Definition: LogEntry.php:305
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getWorkspaceUid
‪int getWorkspaceUid()
Definition: LogEntry.php:432
‪TYPO3\CMS\Belog\Domain\Model\LogEntry
Definition: LogEntry.php:28
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$recordUid
‪int $recordUid
Definition: LogEntry.php:55
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getAction
‪int getAction()
Definition: LogEntry.php:164
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setRecordUid
‪setRecordUid($recordUid)
Definition: LogEntry.php:174
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setTstamp
‪setTstamp($tstamp)
Definition: LogEntry.php:295
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$tstamp
‪int $tstamp
Definition: LogEntry.php:85
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$error
‪int $error
Definition: LogEntry.php:73
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setError
‪setError($error)
Definition: LogEntry.php:234
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$details
‪string $details
Definition: LogEntry.php:79
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$pid
‪int $pid
Definition: LogEntry.php:33
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setIp
‪setIp($ip)
Definition: LogEntry.php:355
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getTableName
‪string getTableName()
Definition: LogEntry.php:204
‪TYPO3\CMS\Belog\Domain\Model
Definition: Constraint.php:16
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getIp
‪string getIp()
Definition: LogEntry.php:365
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setWorkspaceUid
‪setWorkspaceUid($workspaceUid)
Definition: LogEntry.php:422
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getNewId
‪string getNewId()
Definition: LogEntry.php:452
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getDetailsNumber
‪int getDetailsNumber()
Definition: LogEntry.php:345