Main API Service for interacting with Flux-based FlexForms
Inheritance: implements TYPO3\CMS\Core\SingletonInterface
示例#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);
 }
示例#2
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);
     }
 }
示例#3
0
 /**
  * @test
  */
 public function testLoadRecordFromDatabaseWithLanguageUidNotZero()
 {
     $mock = new ContentService();
     /** @var WorkspacesAwareRecordService $mockService */
     $mockService = $this->getMock('FluidTYPO3\\Flux\\Service\\WorkspacesAwareRecordService', array('getSingle'));
     $mockService->expects($this->once())->method('getSingle')->with('tt_content', '*');
     $mock->injectWorkspacesAwareRecordService($mockService);
     $this->callInaccessibleMethod($mock, 'loadRecordFromDatabase', 123, 321);
 }
示例#4
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);
 }