fixPositionInLocalization() public method

public fixPositionInLocalization ( integer $uid, integer $languageUid, array &$defaultLanguageRecord, TYPO3\CMS\Core\DataHandling\DataHandler $reference )
$uid integer uid of record in default language
$languageUid integer sys_language_uid of language for the localized record
$defaultLanguageRecord array record in default language (from table tt_content)
$reference TYPO3\CMS\Core\DataHandling\DataHandler
Beispiel #1
0
 /**
  * Post-process a command executed on a record form the table this ConfigurationProvider
  * is attached to.
  *
  * @param string $command
  * @param integer $id
  * @param array $row
  * @param integer $relativeTo
  * @param DataHandler $reference
  * @return void
  */
 public function postProcessCommand($command, $id, array &$row, &$relativeTo, DataHandler $reference)
 {
     if (TRUE === self::shouldCallWithClassName(__CLASS__, __FUNCTION__, $id)) {
         parent::postProcessCommand($command, $id, $row, $relativeTo, $reference);
         $pasteCommands = array('copy', 'move');
         if (TRUE === in_array($command, $pasteCommands)) {
             $callback = $this->getCallbackCommand();
             if (TRUE === isset($callback['paste'])) {
                 $pasteCommand = $callback['paste'];
                 $parameters = explode('|', $pasteCommand);
                 $this->contentService->pasteAfter($command, $row, $parameters, $reference);
             } else {
                 $moveData = (array) $this->getMoveData();
                 $this->contentService->moveRecord($row, $relativeTo, $moveData, $reference);
             }
         }
         if ('localize' === $command) {
             $this->contentService->fixPositionInLocalization($id, $relativeTo, $row, $reference);
         }
         self::trackMethodCallWithClassName(__CLASS__, __FUNCTION__, $id);
     }
 }