‪TYPO3CMS  9.5
LogEntry.php
Go to the documentation of this file.
1 <?php
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 
25 {
31  protected ‪$pid = 0;
32 
42  protected ‪$backendUserUid = 0;
43 
49  protected ‪$action = 0;
50 
56  protected ‪$recordUid = 0;
57 
63  protected ‪$tableName = 0;
64 
70  protected ‪$recordPid = 0;
71 
77  protected ‪$error = 0;
78 
84  protected ‪$details = '';
85 
91  protected ‪$tstamp = 0;
92 
98  protected ‪$type = 0;
99 
105  protected ‪$detailsNumber = 0;
106 
112  protected ‪$ip = '';
113 
119  protected ‪$logData = '';
120 
126  protected ‪$eventPid = 0;
127 
133  protected ‪$workspaceUid = 0;
134 
140  protected ‪$newId = 0;
141 
147  public function ‪setPid(‪$pid)
148  {
149  $this->pid = (int)‪$pid;
150  }
151 
157  public function ‪getPid()
158  {
159  return ‪$this->pid;
160  }
161 
167  public function ‪setBackendUserUid($beUserUid)
168  {
169  $this->backendUserUid = $beUserUid;
170  }
171 
177  public function ‪getBackendUserUid()
178  {
180  }
181 
187  public function ‪setAction(‪$action)
188  {
189  $this->action = ‪$action;
190  }
191 
197  public function ‪getAction()
198  {
199  return (int)‪$this->action;
200  }
201 
207  public function ‪setRecordUid(‪$recordUid)
208  {
209  $this->recordUid = ‪$recordUid;
210  }
211 
217  public function ‪getRecordUid()
218  {
219  return (int)‪$this->recordUid;
220  }
221 
227  public function ‪setTableName(‪$tableName)
228  {
229  $this->tableName = ‪$tableName;
230  }
231 
237  public function ‪getTableName()
238  {
239  return ‪$this->tableName;
240  }
241 
247  public function ‪setRecordPid(‪$recordPid)
248  {
249  $this->recordPid = ‪$recordPid;
250  }
251 
257  public function ‪getRecordPid()
258  {
259  return (int)‪$this->recordPid;
260  }
261 
267  public function ‪setError(‪$error)
268  {
269  $this->error = ‪$error;
270  }
271 
277  public function ‪getError()
278  {
279  return (int)‪$this->error;
280  }
281 
287  public function ‪getErrorIconClass(): string
288  {
289  switch ($this->‪getError()) {
290  case 1:
291  return 'status-dialog-warning';
292  case 2:
293  case 3:
294  return 'status-dialog-error';
295  default:
296  return 'empty-empty';
297  }
298  }
299 
305  public function ‪setDetails(‪$details)
306  {
307  $this->details = ‪$details;
308  }
309 
315  public function ‪getDetails()
316  {
317  if ($this->type === 255) {
318  return str_replace('###IP###', $this->ip, $this->details);
319  }
320  return ‪$this->details;
321  }
322 
328  public function ‪setTstamp(‪$tstamp)
329  {
330  $this->tstamp = ‪$tstamp;
331  }
332 
338  public function ‪getTstamp()
339  {
340  return (int)‪$this->tstamp;
341  }
342 
348  public function ‪setType(‪$type)
349  {
350  $this->type = ‪$type;
351  }
352 
358  public function ‪getType()
359  {
360  return (int)‪$this->type;
361  }
362 
368  public function ‪setDetailsNumber(‪$detailsNumber)
369  {
370  $this->detailsNumber = ‪$detailsNumber;
371  }
372 
378  public function ‪getDetailsNumber()
379  {
380  return (int)‪$this->detailsNumber;
381  }
382 
388  public function ‪setIp(‪$ip)
389  {
390  $this->ip = ‪$ip;
391  }
392 
398  public function ‪getIp()
399  {
400  return ‪$this->ip;
401  }
402 
408  public function ‪setLogData(‪$logData)
409  {
410  $this->logData = ‪$logData;
411  }
412 
418  public function ‪getLogData()
419  {
420  if ($this->logData === '') {
421  return [];
422  }
423  ‪$logData = @unserialize($this->logData);
424  if (!is_array(‪$logData)) {
425  ‪$logData = [];
426  }
427  return ‪$logData;
428  }
429 
435  public function ‪setEventPid(‪$eventPid)
436  {
437  $this->eventPid = ‪$eventPid;
438  }
439 
445  public function ‪getEventPid()
446  {
447  return (int)‪$this->eventPid;
448  }
449 
455  public function ‪setWorkspaceUid(‪$workspaceUid)
456  {
457  $this->workspaceUid = ‪$workspaceUid;
458  }
459 
465  public function ‪getWorkspaceUid()
466  {
467  return (int)‪$this->workspaceUid;
468  }
469 
475  public function ‪setNewId(‪$newId)
476  {
477  $this->newId = ‪$newId;
478  }
479 
485  public function ‪getNewId()
486  {
487  return ‪$this->newId;
488  }
489 }
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$workspaceUid
‪int $workspaceUid
Definition: LogEntry.php:118
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setType
‪setType($type)
Definition: LogEntry.php:332
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setRecordPid
‪setRecordPid($recordPid)
Definition: LogEntry.php:231
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getRecordUid
‪int getRecordUid()
Definition: LogEntry.php:201
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getType
‪int getType()
Definition: LogEntry.php:342
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getEventPid
‪int getEventPid()
Definition: LogEntry.php:429
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$detailsNumber
‪int $detailsNumber
Definition: LogEntry.php:94
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$backendUserUid
‪int $backendUserUid
Definition: LogEntry.php:40
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setAction
‪setAction($action)
Definition: LogEntry.php:171
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getError
‪int getError()
Definition: LogEntry.php:261
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setTableName
‪setTableName($tableName)
Definition: LogEntry.php:211
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getBackendUserUid
‪int getBackendUserUid()
Definition: LogEntry.php:161
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setEventPid
‪setEventPid($eventPid)
Definition: LogEntry.php:419
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$action
‪int $action
Definition: LogEntry.php:46
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setBackendUserUid
‪setBackendUserUid($beUserUid)
Definition: LogEntry.php:151
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$recordPid
‪int $recordPid
Definition: LogEntry.php:64
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$ip
‪string $ip
Definition: LogEntry.php:100
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$logData
‪string $logData
Definition: LogEntry.php:106
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:22
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getRecordPid
‪int getRecordPid()
Definition: LogEntry.php:241
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$type
‪int $type
Definition: LogEntry.php:88
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setPid
‪setPid($pid)
Definition: LogEntry.php:131
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setNewId
‪setNewId($newId)
Definition: LogEntry.php:459
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getLogData
‪array getLogData()
Definition: LogEntry.php:402
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setDetails
‪setDetails($details)
Definition: LogEntry.php:289
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$eventPid
‪int $eventPid
Definition: LogEntry.php:112
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setLogData
‪setLogData($logData)
Definition: LogEntry.php:392
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getPid
‪int getPid()
Definition: LogEntry.php:141
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$newId
‪string $newId
Definition: LogEntry.php:124
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getDetails
‪string getDetails()
Definition: LogEntry.php:299
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$tableName
‪string $tableName
Definition: LogEntry.php:58
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getErrorIconClass
‪string getErrorIconClass()
Definition: LogEntry.php:271
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setDetailsNumber
‪setDetailsNumber($detailsNumber)
Definition: LogEntry.php:352
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getTstamp
‪int getTstamp()
Definition: LogEntry.php:322
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getWorkspaceUid
‪int getWorkspaceUid()
Definition: LogEntry.php:449
‪TYPO3\CMS\Belog\Domain\Model\LogEntry
Definition: LogEntry.php:25
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$recordUid
‪int $recordUid
Definition: LogEntry.php:52
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getAction
‪int getAction()
Definition: LogEntry.php:181
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setRecordUid
‪setRecordUid($recordUid)
Definition: LogEntry.php:191
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setTstamp
‪setTstamp($tstamp)
Definition: LogEntry.php:312
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$tstamp
‪int $tstamp
Definition: LogEntry.php:82
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$error
‪int $error
Definition: LogEntry.php:70
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setError
‪setError($error)
Definition: LogEntry.php:251
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$details
‪string $details
Definition: LogEntry.php:76
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\$pid
‪int $pid
Definition: LogEntry.php:30
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setIp
‪setIp($ip)
Definition: LogEntry.php:372
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getTableName
‪string getTableName()
Definition: LogEntry.php:221
‪TYPO3\CMS\Belog\Domain\Model
Definition: Constraint.php:2
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getIp
‪string getIp()
Definition: LogEntry.php:382
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\setWorkspaceUid
‪setWorkspaceUid($workspaceUid)
Definition: LogEntry.php:439
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getNewId
‪string getNewId()
Definition: LogEntry.php:469
‪TYPO3\CMS\Belog\Domain\Model\LogEntry\getDetailsNumber
‪int getDetailsNumber()
Definition: LogEntry.php:362