Feature #58611

TCA: Extending "behaviour" for IRRE fields with "disableCopyingChildrenWithParent"

Added by Jan Kornblum over 6 years ago. Updated 25 days ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2014-05-07
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

It would be a great feature to extend the "behaviour" for IRRE fields with an option called "disableCopyingChildrenWithParent" (related to "disableMovingChildrenWithParent"). In some cases it might be neccessary to disable to copying of children, for example when having a bidirectional relation "ModelA <1:n> ModelB <n:1>".

$TCA['tx_myext_table']['columns']['field'] = array(
'config' => array(
'type' => 'inline',
'foreign_table' => '...',
'appearance' => array(
...
),
'behaviour' => array(
'disableMovingChildrenWithParent' => 1,
'disableCopyingChildrenWithParent' => 1,
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => 1,
)
),
);

typo3-cms-core-disable-copying-children-with-parent.patch View (2.58 KB) Mathias Brodala, 2020-05-05 13:24

typo3-cms-core-v9-disable-copying-children-with-parent.patch View (2.25 KB) Mathias Brodala, 2020-09-28 17:52


Related issues

Related to TYPO3 Core - Bug #61835: Copying IRRE child records behaviour differs with certain TCA settings Accepted 2014-09-24

History

#1 Updated by Oliver Hader over 6 years ago

  • Status changed from New to Accepted

I agree, since the default moving behavior of child records can be overridden individually, the accordant behavior for copying records is missing in my eyes.

#2 Updated by Mathias Schreiber almost 5 years ago

  • Category changed from 978 to DataHandler aka TCEmain

#3 Updated by Markus Bischof over 3 years ago

+1

#4 Updated by Markus Bischof over 3 years ago

As a temporary workaround you could simulate this behaviour with the setToDefaultOnCopy in the ctrl section. But I aggree, it would be more straight forward with the described option.

#5 Updated by Mathias Brodala 6 months ago

Here's a very basic patch which implements this for TYPO3v8.

#6 Updated by Mathias Brodala 6 months ago

  • Related to Bug #61835: Copying IRRE child records behaviour differs with certain TCA settings added

#7 Updated by Mathias Brodala 25 days ago

Here's the patch refreshed for TYPO3v9.

Also available in: Atom PDF