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 #1

Updated by Jeff Segars almost 17 years ago

I agree that this would be a great addition to IRRE.

My scenario is like case #2. I'm currently using a foreign_table_field to save the types correctly, but I would prefer that my type field not be editable like David describes.

Actions #2

Updated by Thomas Deinhamer over 11 years ago

That's a nice feature for which I'm in need actually too. :)

Actions #3

Updated by Stefan Galinski over 11 years ago

  • Category set to 978
  • Target version deleted (0)
Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Target version set to 8 LTS
Actions #5

Updated by Riccardo De Contardi over 7 years ago

  • Target version changed from 8 LTS to 9.0
Actions #6

Updated by Susanne Moog over 6 years ago

  • Target version changed from 9.0 to Candidate for Major Version
Actions #7

Updated by Susanne Moog over 4 years ago

  • Status changed from Accepted to Closed

This is now possible for quite some time by using overrideChildTca - which not only allows to define the types visible but also a lot more settings / tca config in inline context.

Actions

Also available in: Atom PDF