TYPO3 CMS  TYPO3_6-2
CombinedRecord.php
Go to the documentation of this file.
1 <?php
3 
22 
26  protected $table;
27 
31  protected $versionRecord;
32 
36  protected $liveRecord;
37 
46  static public function create($table, $liveId, $versionId) {
49  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Domain\\Model\\CombinedRecord', $table, $liveRecord, $versionRecord);
50  }
51 
60  static public function createFromArrays($table, array $liveRow, array $versionRow) {
63  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Domain\\Model\\CombinedRecord', $table, $liveRecord, $versionRecord);
64  }
65 
73  public function __construct($table, \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $liveRecord, \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $versionRecord) {
74  $this->setTable($table);
75  $this->setLiveRecord($liveRecord);
76  $this->setVersionRecord($versionRecord);
77  }
78 
84  public function getTable() {
85  return $this->table;
86  }
87 
94  public function setTable($table) {
95  $this->table = $table;
96  }
97 
103  public function getLiveRecord() {
104  return $this->liveRecord;
105  }
106 
113  public function setLiveRecord(\TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $liveRecord) {
114  $this->liveRecord = $liveRecord;
115  }
116 
122  public function getVersionRecord() {
123  return $this->versionRecord;
124  }
125 
132  public function setVersionRecord(\TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $versionRecord) {
133  $this->versionRecord = $versionRecord;
134  }
135 
141  public function getLiveId() {
142  return $this->getLiveRecord()->getUid();
143  }
144 
150  public function getVersiondId() {
151  return $this->getVersionRecord()->getUid();
152  }
153 
154 }
static createFromArrays($table, array $liveRow, array $versionRow)
setVersionRecord(\TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $versionRecord)
static create($table, $liveId, $versionId)
__construct($table, \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $liveRecord, \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $versionRecord)
setLiveRecord(\TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord $liveRecord)