[TYPO3-mvc] TYPO3 backend is irrespective of value objects?

Sebastian Fischer sf at marketing-factory.de
Mon Jan 3 14:06:22 CET 2011


Only alternaty would be to use a hooks that extends the evaluation which 
then prevents the saving by invalidating the creation attempt.

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] 
= 'tx_yourobject_processDatamap';

class tx_yourobject_processDatamap {
	public function processCmdmap_preProcess(&$command, $table, $id, 
$value, $pObj) {}
}

In this case the $command must be set to null if the value already 
exists. That prevents further processing.

Hope it was explained well enough.

Greetings
Sebastian

On 03.01.2011 12:02, Stefan Isak wrote:
> Hey Sebastian,
>
> thanks for your hint, even if I'm not sure if it's really a workaround.
>
> Using eval = unique won't prevent TYPO3 from creating the record. What actually happens is, that TYPO3 increments values.
> E.g. saving twice an object having just one property with a value 'work' creates two records 'work' and 'work0'.
>
> Does that mean there is no way right now to handle this and I can't properly use the TYPO3 backend for editing purposes whenever my domain design contains value objects?
>
> Greetings
> Stefan
>



More information about the TYPO3-project-typo3v4mvc mailing list