/** * @param string $tableName * @param int $id */ public function add($tableName, $id) { $databaseRecord = DatabaseRecord::create($tableName, $id); if (!isset($this->records[$databaseRecord->getIdentifier()])) { $this->records[$databaseRecord->getIdentifier()] = $databaseRecord; } }
/** * Creates combined record object just by live-id and version-id of database record rows. * * @param string $table Name of the database table * @param integer $liveId Id of the database live-record row * @param integer $versionId Id of the datbase version-record row * @return \TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord */ public static function create($table, $liveId, $versionId) { $liveRecord = \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord::create($table, $liveId); $versionRecord = \TYPO3\CMS\Workspaces\Domain\Model\DatabaseRecord::create($table, $versionId); return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Domain\\Model\\CombinedRecord', $table, $liveRecord, $versionRecord); }