Project

General

Profile

Actions

Feature #17156

closed

Define type of child record

Added by David Bruehlmeier over 17 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
FormEngine aka TCEforms
Start date:
2007-03-27
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

I would like to propose a new IRRE feature which allows to define the type of the foreign record created by IRRE.

Let me explain by taking two real-world examples from the Party Information Framework:

1. A party can have 0..n names. Each name has a type (either "person name" or "organisation name"). The type defines which fields are available for input, using the regular type-definition of TCA.

2. A party can have 0..n images. The same is true for addresses. Each image also has a type (either "party image" or "address image").

The feature request: As soon as the slave record is created by IRRE, the proper type is already selected (and not changeable). Only the fields for the selected type (according to TCA) are displayed.

I propose a new TCA attribute, e.g. 'foreign_type', which might look as follows:

Case 1:
$TCA['tx_party_parties']['columns']['names']['config'] = array(
...
'foreign_type' => array(
'0' => '0', // Party type = 0 (Person) => Name type = 0 (Person name)
'1' => '1', // Party type = 1 (Org.) => Name type = 1 (Org.name)
),
...

Case 2:
$TCA['tx_party_parties']['columns']['images']['config'] = array(
...
'foreign_type' => 0, // Always "Party image"
...

$TCA['tx_party_addresses']['columns']['images']['config'] = array(
...
'foreign_type' => 1, // Always "Address image"
...

So the general rule is:
1. If the 'foreign_type' is an array, then the array is a mapping from "Type of master table" to "Type of slave table".
2. Else it is the type of the slave table, regardless of the type of the master.

See Thread in the IRRE Newslist:
http://lists.typo3.org/pipermail/typo3-project-irre/2007-March/000101.html
(issue imported from #M5300)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #17442: Default values defined in TCA not used in IRRE childrenClosedOliver Hader2007-07-06

Actions
Has duplicate TYPO3 Core - Feature #17256: Define type of foreign recordClosedOliver Hader2007-04-27

Actions
Actions

Also available in: Atom PDF