Post-process a command executed on a record form the table this ConfigurationProvider
is attached to.
/** * 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); } }
/** * 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) { 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 { $this->contentService->moveRecord($row, $relativeTo, $reference); } if (0 < count($row)) { $this->updateRecord($row, $id); } } }