Skip to content

Instantly share code, notes, and snippets.

@pumatertion
Created June 27, 2014 09:35
Show Gist options
  • Save pumatertion/fb414f5d96943e3c3813 to your computer and use it in GitHub Desktop.
Save pumatertion/fb414f5d96943e3c3813 to your computer and use it in GitHub Desktop.
/**
* Property Mapping Setup
*
* @return void
*/
public function initializeCreateOverlayAction() {
$propertyMappingConfiguration = $this->arguments['since']->getPropertyMappingConfiguration();
$propertyMappingConfiguration->setTypeConverterOption('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'Y-m-d');
// PropertyMappingConfiguration for Resource
$resourcePropertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration();
$resourcePropertyMappingConfiguration->setTypeConverterOption('TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter', \TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED, true);
$resourcePropertyMappingConfiguration->allowAllPropertiesExcept('number');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment