‪TYPO3CMS  9.5
CombinedRecord.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 
18 
23 {
27  protected ‪$table;
28 
32  protected ‪$versionRecord;
33 
37  protected ‪$liveRecord;
38 
47  public static function ‪create(‪$table, $liveId, $versionId)
48  {
51  return GeneralUtility::makeInstance(CombinedRecord::class, ‪$table, ‪$liveRecord, ‪$versionRecord);
52  }
53 
62  public static function ‪createFromArrays(‪$table, array $liveRow, array $versionRow)
63  {
66  return GeneralUtility::makeInstance(CombinedRecord::class, ‪$table, ‪$liveRecord, ‪$versionRecord);
67  }
68 
77  {
78  $this->‪setTable(‪$table);
79  $this->‪setLiveRecord($liveRecord);
80  $this->‪setVersionRecord($versionRecord);
81  }
82 
88  public function ‪getTable()
89  {
90  return ‪$this->table;
91  }
92 
98  public function ‪setTable(‪$table)
99  {
100  $this->table = ‪$table;
101  }
102 
108  public function ‪getLiveRecord()
109  {
110  return ‪$this->liveRecord;
111  }
112 
119  {
120  $this->liveRecord = ‪$liveRecord;
121  }
122 
128  public function ‪getVersionRecord()
129  {
131  }
132 
139  {
140  $this->versionRecord = ‪$versionRecord;
141  }
142 
148  public function ‪getLiveId()
149  {
150  return $this->‪getLiveRecord()->‪getUid();
151  }
152 
158  public function ‪getVersiondId()
159  {
160  return $this->‪getVersionRecord()->‪getUid();
161  }
162 }
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setVersionRecord
‪setVersionRecord(DatabaseRecord $versionRecord)
Definition: CombinedRecord.php:135
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord
Definition: CombinedRecord.php:23
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\createFromArray
‪static DatabaseRecord createFromArray($table, array $row)
Definition: DatabaseRecord.php:56
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getTable
‪string getTable()
Definition: CombinedRecord.php:85
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$liveRecord
‪DatabaseRecord $liveRecord
Definition: CombinedRecord.php:34
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\create
‪static CombinedRecord create($table, $liveId, $versionId)
Definition: CombinedRecord.php:44
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\__construct
‪__construct($table, DatabaseRecord $liveRecord, DatabaseRecord $versionRecord)
Definition: CombinedRecord.php:73
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord
Definition: DatabaseRecord.php:24
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setLiveRecord
‪setLiveRecord(DatabaseRecord $liveRecord)
Definition: CombinedRecord.php:115
‪TYPO3\CMS\Workspaces\Domain\Model
Definition: CombinedRecord.php:2
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\createFromArrays
‪static CombinedRecord createFromArrays($table, array $liveRow, array $versionRow)
Definition: CombinedRecord.php:59
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\getUid
‪int getUid()
Definition: DatabaseRecord.php:100
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\setTable
‪setTable($table)
Definition: CombinedRecord.php:95
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getVersiondId
‪int getVersiondId()
Definition: CombinedRecord.php:155
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getLiveRecord
‪DatabaseRecord getLiveRecord()
Definition: CombinedRecord.php:105
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$versionRecord
‪DatabaseRecord $versionRecord
Definition: CombinedRecord.php:30
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getLiveId
‪int getLiveId()
Definition: CombinedRecord.php:145
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\$table
‪string $table
Definition: CombinedRecord.php:26
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord\getVersionRecord
‪DatabaseRecord getVersionRecord()
Definition: CombinedRecord.php:125
‪TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord\create
‪static DatabaseRecord create($table, $uid)
Definition: DatabaseRecord.php:44