Skip to content

Commit d9a33bb

Browse files
[Backport 14.3] [FEATURE] Respect record types in new record wizard (#1416)
[FEATURE] Respect record types in new record wizard (#1413) References: TYPO3-Documentation/Changelog-To-Doc#1332 Releases: main, 14.3 (cherry picked from commit f585fec) Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
1 parent 8cf2738 commit d9a33bb

1 file changed

Lines changed: 46 additions & 16 deletions

File tree

Documentation/Types/_Properties/_CreationOptions.rst.txt

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,39 @@
55
:Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']
66
:type: list of options
77

8-
.. versionadded:: 13.0
9-
The page TSconfig option
10-
:confval:`newContentElement.wizardItems.[group].elements.[name] <t3tsref:mod-wizards-newcontentelement-wizarditems>`
11-
can be defined through TCA as well:
8+
.. confval:: defaultValues
9+
:name: types-creationOptions-defaultValues
10+
:Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['defaultValues']
11+
:type: array
12+
:Examples: :ref:`types-example-creation-option`
13+
14+
Default values inserted into the fields of the `tt_content` record on
15+
creation via the "New Content Element" wizard
16+
17+
Can be overridden with page TSconfig option
18+
:confval:`tt_content_defValues <t3tsref:mod-wizards-newcontentelement-wizarditems-group-elements-name-tt-content-defvalues>`.
19+
20+
.. confval:: enableDirectRecordTypeCreation
21+
:name: types-creationOptions-enableDirectRecordTypeCreation
22+
:Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['enableDirectRecordTypeCreation']
23+
:type: bool
24+
:default: true
25+
26+
.. versionadded:: 14.0
27+
28+
Record types registered via TCA are automatically displayed in the
29+
"Create new record" component in the backend module
30+
:guilabel:`Content > Records`.
31+
32+
A record type can be removed from that component via:
33+
34+
.. code-block:: php
35+
:caption: EXT:my_extension/Configuration/TCA/Overrides/my_table.php
36+
37+
$GLOBALS['TCA']['my_table']['types']['my_type']['creationOptions']['enableDirectRecordTypeCreation'] = false;
38+
39+
Event :php:`\TYPO3\CMS\Backend\Controller\Event\ModifyNewRecordCreationLinksEvent`
40+
can be used for more sophisticated modification of the dialogue.
1241

1342
.. confval:: saveAndClose
1443
:name: types-creationOptions-saveAndClose
@@ -17,25 +46,26 @@
1746
:default: false
1847
:Examples: :ref:`types-example-creation-option`
1948

20-
.. versionadded:: 13.0
21-
2249
If true, clicking on the new element wizard will take the user directly
2350
to the :guilabel:`Content > Layout` module, rather than showing the
2451
edit form from the form engine.
2552

2653
Can be overridden with page TSconfig option
2754
:confval:`saveAndClose <t3tsref:mod-wizards-newcontentelement-wizarditems-group-elements-name-saveandclose>`.
2855

29-
.. confval:: defaultValues
30-
:name: types-creationOptions-defaultValues
31-
:Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['defaultValues']
32-
:type: array
33-
:Examples: :ref:`types-example-creation-option`
56+
.. confval:: title
57+
:name: types-creationOptions-title
58+
:Path: $GLOBALS['TCA'][$table]['types'][$type]['creationOptions']['title']
59+
:type: string | language reference
3460

35-
.. versionadded:: 13.0
61+
.. versionadded:: 14.0
3662

37-
Default values inserted into the fields of the `tt_content` record on
38-
creation via the "New Content Element" wizard
63+
With this option it is possible to set an
64+
individual title for the record type, to be used as label on the
65+
creation link in the "Create new record" component.
3966

40-
Can be overridden with page TSconfig option
41-
:confval:`tt_content_defValues <t3tsref:mod-wizards-newcontentelement-wizarditems-group-elements-name-tt-content-defvalues>`.
67+
.. code-block:: php
68+
:caption: EXT:my_extension/Configuration/TCA/Overrides/my_table.php
69+
70+
$GLOBALS['TCA']['my_table']['types']['my_type']['creationOptions']['title']
71+
= 'my_extension.db.myType:title';

0 commit comments

Comments
 (0)