FluidTYPO3\Flux\Service\ContentService::initializeRecord PHP Method

initializeRecord() public method

public initializeRecord ( String $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$id String
$row array
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void
    public function initializeRecord($id, array &$row, DataHandler $tceMain)
    {
        $origUidFieldName = $GLOBALS['TCA']['tt_content']['ctrl']['origUid'];
        $languageFieldName = $GLOBALS['TCA']['tt_content']['ctrl']['languageField'];
        $newUid = (int) $tceMain->substNEWwithIDs[$id];
        $oldUid = (int) $row[$origUidFieldName];
        $newLanguageUid = (int) $row[$languageFieldName];
        $this->initializeRecordByNewAndOldAndLanguageUids($row, $newUid, $oldUid, $newLanguageUid, $languageFieldName, $tceMain);
    }

Usage Example

Beispiel #1
0
 /**
  * @param string $status The command which has been sent to processDatamap
  * @param string $table	The table we're dealing with
  * @param mixed $id Either the record UID or a string if a new record has been created
  * @param array $fieldArray The record row how it has been inserted into the database
  * @param DataHandler $reference A reference to the TCEmain instance
  * @return void
  */
 public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray, &$reference)
 {
     if ('new' === $status && 'tt_content' === $table) {
         $this->contentService->initializeRecord($id, $fieldArray, $reference);
     }
     $arguments = array('status' => $status, 'id' => $id, 'row' => &$fieldArray);
     $fieldArray = $this->executeConfigurationProviderMethod('postProcessDatabaseOperation', $table, $id, $fieldArray, $arguments, $reference);
 }