[Flow] \DateTimeConverter

mario chiari ml at mariochiari.net
Sun Jun 16 19:15:39 CEST 2013


Hi Bastian, All

I looked again at my \DateTimeConverter little problem, and made some
progress:

Remind I have a Father/Son situation, and I have a Edit form to edit  a
Father and all of his Sons. 
The following works

public function initializeUpdateAction() {
	  $this->arguments['father']
	->getPropertyMappingConfiguration()
	->forProperty('father_date')
	->setTypeConverterOption('TYPO3\Flow\Property\TypeConverter
\DateTimeConverter', \TYPO3\Flow\Property\TypeConverter
\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd-m-Y');

  $this->arguments['father']
	->getPropertyMappingConfiguration()
	->forProperty('sons.0.son_date')
	->setTypeConverterOption('TYPO3\Flow\Property\TypeConverter
\DateTimeConverter',\TYPO3\Flow\Property\TypeConverter
\DateTimeConverter::CONFIGURATION_DATE_FORMAT,'d-m-Y'); 

  $this->arguments['father']
	->getPropertyMappingConfiguration()
	->forProperty('sons.1.son_date')
	->setTypeConverterOption('TYPO3\Flow\Property\TypeConverter
\DateTimeConverter',\TYPO3\Flow\Property\TypeConverter
\DateTimeConverter::CONFIGURATION_DATE_FORMAT,'d-m-Y'); 
	}   

Clearly, it is a ugly fix.
But I am not able to use something like <sons.*.son_date>. Why? Where
should look for a mistake? 

Thanks
Cheers
mario

On Mon, 2013-06-03 at 22:19 +0200, mario chiari wrote:
> Hi Bastian, All,
....



More information about the Flow mailing list