[TYPO3-dev]  edit mm tables in backend  forms with TCA
    Franz Holzinger 
    franz at fholzinger.com
       
    Thu Dec 29 17:24:16 CET 2005
    
    
  
Hello developers,
I am looking for a solution how I could use the backend TCE form engine 
to edit mm tables which should be configured with TCA like normal 
tables. This is because some attributes are needed for the mm tables and 
cannot be used with the normal tables.
So I need to write a hook for SC_alt_doc::getRecordForEdit
/**
* Get record for editing.
*
* @param	string		Table name
* @param	integer		Record UID
* @return	array		Returns record to edit, false if none
*/
function getRecordForEdit($table,$theUid)	{
	global $TCA;
		// Fetch requested record:
	$reqRecord = t3lib_BEfunc::getRecord($table,$theUid,'uid,pid');
Here only tables with uid and pid fields can be used. The mm tables 
however have something like
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
$theUid can be used to find all fitting uid_locals here. There is no pid 
with mm tables.
Do you have any suggestions how this should be implemented?
Regards,
Franz
    
    
More information about the TYPO3-dev
mailing list