[FEATURE] IRRE: Provide default values for created records 15/18815/9
authorSebastian Michaelsen <michaelsen@t3seo.de>
Fri, 8 Mar 2013 12:08:54 +0000 (13:08 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 5 Jul 2013 15:14:42 +0000 (17:14 +0200)
commit7340fb2bfdcd55c5bcdef6aa099950521c04c3d0
treeb444d932f8505b4c85e689c957f5d07435d1f124
parent7ebf67b88853d2f6562737432ad6bb229f84f724
[FEATURE] IRRE: Provide default values for created records

This change introduces a new TCA option to configure 'inline' fields:
'foreign_record_defaults' gives you the possibility to set values
in new created records.

Usage example:
config => array(
  'type' => 'inline',
  'foreign_table' => 'tt_content',
  'foreign_record_defaults' => array(
    'CType' => 'image'
  ),
)

That means tt_content elements that are created for this IRRE field
will be image content elements by default (and can be set to another
type by the editor before saving).

The following fields can't be set by this feature because they must
stay under system control:
uid, pid and t3ver_*
and the fields that are configured with the following TCA-ctrl options:
crdate, cruser_id, delete, origUid, transOrigDiffSourceField,
transOrigPointerField and tstamp

Change-Id: I539f9941cc69506590b55a3520f95e38d5e61dd1
Documentation: #46440
Resolves: #46124
Releases: 6.2
Reviewed-on: https://review.typo3.org/18815
Reviewed-by: Oliver Hader
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/backend/Classes/Form/Element/InlineElement.php