AW: [Typo3-dev] Data-Modell Problems

Thomas Murphy murphy at spreekonzept.de
Thu Jun 30 19:17:10 CEST 2005


Waggershauser, Thomas wrote:
> ...so I have a field in the timepattern table that associates the record 
> with that event. Unfortunately, when you create a new event, this event 
> has to be saved before you can create those patterns, because TYPO3 
> works with a temporary uid until you save the record for the first time.
> 
> I don't know where the problem is. You use pop-ups, don't you? If you do it without popup, the user must save before adding a new 
timepattern. Done.

o.k. May I give my customer your phone number, just in case he 
encounters any problems? ;)

> But it seems like you solved my problem:
> I don't know how to get the event-uid into the timepattern. I've spent the whole day reading the wizard-source, but no way. How do you do this?

Ah.. yes. I forgot that. I think the information I gave you before was a 
bit outdated, this way the association to a certain record is not 
possible, just the filtering.

I'm using a userFunc in the tca.php for the timepatterns field

http://typo3.org/documentation/document-library/doc_core_api/columns_fieldnam-9/

-snip--------------------------------------------------
<?php
if (!defined ("TYPO3_MODE")) 	die ("Access denied.");

require_once(t3lib_extMgm::extPath('myext').'classes/class.tx_myext_form.php');

[...]

"timepatterns" => Array (
         	"label" => 
"LLL:EXT:myext/locallang_db.php:tx_myext_event.timepatterns",
			'config' => Array (
				'type' => 'user',
				'userFunc' => 'tx_myext_form->timepatterns',
				"uploadfolder" => "uploads/tx_myext",
			)		
),		
-snip--------------------------------------------------


In class.tx_myext_form.php :

-snip--------------------------------------------------
class tx_myext_form extends t3lib_TCEforms {

[...]

function timepatterns($PA, $fobj){

-snip--------------------------------------------------

So the function timepatterns gets the parameter $PA which is an array 
containing the information of the record from the form that triggered 
this wizard.
Through my individual userFunc form field I'm able to pass additional 
GP-parameters, and that's where the uid gets to the new record.
(at least I think that's how it worked)

I will be able to tell you in more detail at the weekend.

> Yes, Flexforms. I know, i have to learn this thing as well!

It's relatively easy, but AFAIK also a bit limited by now...

bye,
Murphy




More information about the TYPO3-dev mailing list