‪TYPO3CMS  10.4
CombinedRecord.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 
24 {
28  protected ‪$table;
29 
33  protected ‪$versionRecord;
34 
38  protected ‪$liveRecord;
39 
48  public static function ‪create(‪$table, $liveId, $versionId)
49  {
52  return GeneralUtility::makeInstance(CombinedRecord::class, ‪$table, ‪$liveRecord, ‪$versionRecord);
53  }
54 
63  public static function ‪createFromArrays(‪$table, array $liveRow, array $versionRow)
64  {
67  return GeneralUtility::makeInstance(CombinedRecord::class, ‪$table, ‪$liveRecord, ‪$versionRecord);
68  }
69 
78  {
79  $this->‪setTable(‪$table);
80  $this->‪setLiveRecord($liveRecord);
81  $this->‪setVersionRecord($versionRecord);
82  }
83 
89  public function ‪getTable()
90  {
91  return ‪$this->table;
92  }
93 
99  public function ‪setTable(‪$table)
100  {
101  $this->table = ‪$table;
102  }
103 
109  public function ‪getLiveRecord()
110  {
111  return ‪$this->liveRecord;
112  }
113 
120  {
121  $this->liveRecord = ‪$liveRecord;
122  }
123 
129  public function ‪getVersionRecord()
130  {
132  }
133 
140  {
141  $this->versionRecord = ‪$versionRecord;
142  }
143 
149  public function ‪getLiveId()
150  {
151  return $this->‪getLiveRecord()->‪getUid();
152  }
153 
159  public function ‪getVersiondId()
160  {
161  return $this->‪getVersionRecord()->‪getUid();
162  }
163 }
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setVersionRecord
‪setVersionRecord(DatabaseRecord $versionRecord)
Definition: CombinedRecord.php:136
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord
Definition: CombinedRecord.php:24
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\createFromArray
‪static DatabaseRecord createFromArray($table, array $row)
Definition: DatabaseRecord.php:57
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getTable
‪string getTable()
Definition: CombinedRecord.php:86
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$liveRecord
‪DatabaseRecord $liveRecord
Definition: CombinedRecord.php:35
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\create
‪static CombinedRecord create($table, $liveId, $versionId)
Definition: CombinedRecord.php:45
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\__construct
‪__construct($table, DatabaseRecord $liveRecord, DatabaseRecord $versionRecord)
Definition: CombinedRecord.php:74
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord
Definition: DatabaseRecord.php:25
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setLiveRecord
‪setLiveRecord(DatabaseRecord $liveRecord)
Definition: CombinedRecord.php:116
‪TYPO3\CMS\Workspaces\Domain\Model
Definition: CombinedRecord.php:16
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\createFromArrays
‪static CombinedRecord createFromArrays($table, array $liveRow, array $versionRow)
Definition: CombinedRecord.php:60
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\getUid
‪int getUid()
Definition: DatabaseRecord.php:101
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setTable
‪setTable($table)
Definition: CombinedRecord.php:96
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getVersiondId
‪int getVersiondId()
Definition: CombinedRecord.php:156
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getLiveRecord
‪DatabaseRecord getLiveRecord()
Definition: CombinedRecord.php:106
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$versionRecord
‪DatabaseRecord $versionRecord
Definition: CombinedRecord.php:31
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getLiveId
‪int getLiveId()
Definition: CombinedRecord.php:146
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$table
‪string $table
Definition: CombinedRecord.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getVersionRecord
‪DatabaseRecord getVersionRecord()
Definition: CombinedRecord.php:126
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\create
‪static DatabaseRecord create($table, $uid)
Definition: DatabaseRecord.php:45