[BUGFIX] Adapt TCA signature for customControls to the documentation
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Deprecation-83750-AdaptTCASignatureForInlineCustomControl.rst
1 .. include:: ../../Includes.txt
2
3 ============================================================
4 Deprecation: #83750 - Adapt TCA signature for customControls
5 ============================================================
6
7 See :issue:`83750`
8
9 Description
10 ===========
11
12 According to the TCA documentation since TYPO3 v4.7, the definition of "customControls" for "inline" columns
13 is as follows:
14
15 Numerical array containing definitions of custom header controls for IRRE fields. This makes it possible to
16 create special controls by calling user-defined functions (userFuncs). Each item in the array item must be
17 an array itself, with at least on key "userFunc" pointing to the user function to call.
18
19 The implementation instead relied on the userFunc string being provided as the key of the array.
20
21
22 Impact
23 ======
24
25 TCA definition for "inline" fields using custom header controls for IIRE fields will trigger a deprecation:
26
27 .. code-block:: php
28
29 'some-column' => [
30 'config' => [
31 'type' => 'inline',
32 // ...
33 'customControls' => [
34 \Vendor\MyExtension\Tca\MyFirstCustomControl::class . '->render',
35 \Vendor\MyExtension\Tca\MySecondCustomControl::class . '->render'
36 ]
37 ]
38 ]
39
40
41 Migration
42 =========
43
44 Update the TCA definition with a `userFunc` key for specifying the method to be called:
45
46 .. code-block:: php
47
48 'some-column' => [
49 'config' => [
50 'type' => 'inline',
51 // ...
52 'customControls' => [
53 [
54 'userFunc' => \Vendor\MyExtension\Tca\MyFirstCustomControl::class . '->render'
55 ],
56 [
57 'userFunc' => \Vendor\MyExtension\Tca\MySecondCustomControl::class . '->render'
58 ]
59 ]
60 ]
61 ]
62
63
64 .. index:: TCA, NotScanned, ext:core