[BUGFIX] Use correct PHP syntax in code example
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / 8.7 / Deprecation-80000-InlineOverrideChildTca.rst
1 .. include:: ../../Includes.txt
2
3 ============================================
4 Deprecation: #80000 - InlineOverrideChildTca
5 ============================================
6
7 See :issue:`80000`
8
9 Description
10 ===========
11
12 These :php:`TCA` :php:`type=inline` properties have been deprecated and superseded with the more
13 general property :php:`overrideChildTca`:
14
15 * foreign_types
16 * foreign_selector_fieldTcaOverride
17 * foreign_record_defaults
18
19
20 Impact
21 ======
22
23 It is now possible to override display (FormEngine) related columns properties and the types section of
24 child :php:`TCA` from within the parent :php:`TCA`. This is also allowed in a
25 parents :php:`['types']['columnsOverrides']` section.
26
27
28 Affected Installations
29 ======================
30
31 Instances using one of the above inline properties should adapt to the new :php:`overrideChildTca` property.
32
33
34 Migration
35 =========
36
37 A :php:`TCA` auto-migration is in place. It will transfer the old settings to the new property as
38 shown below and logs deprecation entries if there is no :php:`overrideChildTca` defined. This allows extension
39 authors to keep both the old and the new settings to support CMS v7 and v8 at the same time without
40 having deprecations logged.
41
42 foreign_types before and after transition to overrideChildTca:
43
44 .. code-block:: php
45
46 'columns' => [
47 'aField' => [
48 'config' => [
49 'type' => 'inline',
50 'foreign_types' => [
51 'aForeignType' => [
52 'showitem' => 'aChildField',
53 ],
54 ],
55 ...
56 ],
57 ],
58 ...
59 ],
60
61 .. code-block:: php
62
63 'columns' => [
64 'aField' => [
65 'config' => [
66 'type' => 'inline',
67 'overrideChildTca' => [
68 'types' => [
69 'aForeignType' => [
70 'showitem' => 'aChildField',
71 ],
72 ],
73 ],
74 ...
75 ],
76 ],
77 ...
78 ],
79
80 foreign_selector_fieldTcaOverride before and after transition to overrideChildTca:
81
82 .. code-block:: php
83
84 'columns' => [
85 'aField' => [
86 'config' => [
87 'type' => 'inline',
88 'foreign_selector' => 'uid_local',
89 'foreign_selector_fieldTcaOverride' => [
90 'config' => [
91 'appearance' => [
92 'elementBrowserType' => 'file',
93 ],
94 ],
95 ],
96 ...
97 ],
98 ],
99 ...
100 ],
101
102 .. code-block:: php
103
104 'columns' => [
105 'aField' => [
106 'config' => [
107 'type' => 'inline',
108 'foreign_selector' => 'uid_local',
109 'overrideChildTca' => [
110 'columns' => [
111 'uid_local' => [
112 'config' => [
113 'appearance' => [
114 'elementBrowserType' => 'file',
115 ],
116 ],
117 ],
118 ],
119 ],
120 ...
121 ],
122 ],
123 ...
124 ],
125
126
127 foreign_record_defaults before and after transition to overrideChildTca:
128
129 .. code-block:: php
130
131 'columns' => [
132 'aField' => [
133 'config' => [
134 'type' => 'inline',
135 'foreign_record_defaults' => [
136 'aChildField' => 42,
137 ],
138 ...
139 ],
140 ],
141 ...
142 ],
143
144 .. code-block:: php
145
146 'columns' => [
147 'aField' => [
148 'config' => [
149 'type' => 'inline',
150 'overrideChildTca' => [
151 'columns' => [
152 'aChildField' => [
153 'config' => [
154 'default' => 42,
155 ],
156 ],
157 ],
158 ],
159 ...
160 ],
161 ],
162 ...
163 ],
164
165
166 .. index:: Backend, TCA