moveRecord() public method

Move the content element depending on various request/row parameters.
public moveRecord ( array &$row, string &$relativeTo, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$row array The row which may, may not, trigger moving.
$relativeTo string If not-zero moves record to after this UID (negative) or top of this colPos (positive)
$parameters array List of parameters defining the move operation target
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void
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 = $this->getMoveData();
                 $this->contentService->moveRecord($row, $relativeTo, $moveData, $reference);
             }
         }
         self::trackMethodCallWithClassName(__CLASS__, __FUNCTION__, $id);
     }
 }
Beispiel #2
0
 /**
  * Post-process a command executed on a record form the table this ConfigurationProvider
  * is attached to.
  * Slimmed down version of method from AbstractProvider
  *
  * @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)
 {
     $moveData = $this->getMoveData();
     $this->contentService->moveRecord($row, $relativeTo, $moveData, $reference);
 }