container

container
Path

$GLOBALS['TCA'][$table]['ctrl']

type

array

Scope

Display

Array to configure additional items in render containers of FormEngine, see section Node expansion.

Next to single elements, some render container allow to be "enriched" with additional information via the "node expansion" API. Currently, the OuterWrapContainer implements fieldWizard and fieldInformation. InlineControlContainer implements fieldWizard and comes with the default wizard localizationStateSelector. Custom containers may implement expansion nodes, too, and if implemented correctly will automatically have their configuration merged with the definition provided in this TCA array.

The basic array looks like:

'ctrl' => [
   'container' => [
      '<containerRenderType>' => [
         'fieldWizard' => [
            '<aName>' => [
               'renderType' => '<aRenderType>',
               'before' => ['<anotherName>'],
               'after' => ['<yetAnotherName>'],
               'disabled' => false,
               'options' => [],
            ],
         ],
      ],
   ],
],
Copied!
<containerRenderType>

should be a defined container render type. You can find more about the outerWrapContainer and inlineControlContainer in the FormEngine documentation section on rendering. Valid types are for example:

  • outerWrapContainer type which corresponds to the OuterWrapContainer (class).
  • inlineControlContainer type which corresponds to the InlineControlContainer class
  • inline type which corresponds to the InlineControlContainer class.
renderType
refers to a registered node name from NodeFactory
before, after
can be set to sort single wizards relative to each other.
disabled
can be used to disable built in default wizards.
options
Some wizards may support additional "options".

Note, next to "fieldWizard", some containers may also implement "fieldInformation", which can be manipulated the same way.

Examples

Disable a built-in wizard

'ctrl' => [
   'container' => [
      'inlineControlContainer' => [
         'fieldWizard' => [
            'localizationStateSelector' => [
               'disabled' => true,
            ],
         ],
      ],
   ],
],
Copied!

This disables the default localizationStateSelector fieldWizard of inlineControlContainer.

Add your own wizard

Register an own node in a ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1486488059] = [
   'nodeName' => 'ReferencesToThisRecordWizard',
   'priority' => 40,
   'class' => \T3G\AgencyPack\EditorsChoice\FormEngine\FieldWizard\ReferencesToThisRecordWizard::class,
];


Copied!

Register the new node as "fieldWizard" of "tt_content" table in an Configuration/TCA/Overrides/tt_content.php file:

$GLOBALS['TCA']['tt_content']['ctrl']['container'] = [
   'outerWrapContainer' => [
      'fieldWizard' => [
         'ReferencesToThisRecordWizard' => [
            'renderType' => 'ReferencesToThisRecordWizard',
         ],
      ],
   ],
];
Copied!

In PHP, the node has to implement an interface, but can return any additional HTML which is rendered in the "OuterWrapContainer" between the record title and the field body when editing a record:

A new field wizard in OuterWrapContainer

A new field wizard in OuterWrapContainer

Add fieldInformation to field of type inline

This example can be found in Add a custom fieldInformation.