Project

General

Profile

Actions

Feature #17256

closed

Define type of foreign record

Added by David Bruehlmeier almost 17 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-04-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.

(issue imported from #M5515)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #17156: Define type of child recordClosedOliver Hader2007-03-27

Actions

No data to display

Actions

Also available in: Atom PDF