getFlexFormDS_postProcessDS() public method

NOTE: patches data structure resolving in a way that solves a regression in the TYPO3 core when dealing with IRRE AJAX requests (in which the database record is no longer fetched by the controller). This patches not only data structure resolving for Flux data structures but indeed any data structure built using hooks or involving user functions which require the entire record (but when using hooks, supports only extensions which are loaded AFTER or depend on Flux).
public getFlexFormDS_postProcessDS ( array &$dataStructArray, array $conf, array &$row, string $table, string $fieldName ) : void
$dataStructArray array
$conf array
$row array
$table string
$fieldName string
return void
Beispiel #1
0
 /**
  * @param string $fieldName
  * @param string $table
  * @return void
  */
 protected function canExecuteDataStructurePostProcessHookInternal($fieldName = 'pi_flexform', $table = 'tt_content')
 {
     $dataStructure = array();
     $config = array();
     $row = array();
     $instance = new DynamicFlexForm();
     $provider1 = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('postProcessDataStructure'));
     $provider2 = $this->getMock('FluidTYPO3\\Flux\\Provider\\Provider', array('postProcessDataStructure'));
     $provider1->expects($this->once())->method('postProcessDataStructure');
     $provider2->expects($this->once())->method('postProcessDataStructure');
     $providers = array($provider1, $provider2);
     $service = $this->getMock('FluidTYPO3\\Flux\\Service\\FluxService', array('resolveConfigurationProviders'));
     $service->expects($this->once())->method('resolveConfigurationProviders')->with($table, $fieldName, $row)->willReturn($providers);
     $instance->injectConfigurationService($service);
     $instance->getFlexFormDS_postProcessDS($dataStructure, $config, $row, $table, $fieldName);
     $isArrayConstraint = new \PHPUnit_Framework_Constraint_IsType(\PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY);
     $this->assertThat($dataStructure, $isArrayConstraint);
 }