---
title: "Feature: #107047 - FlexForm enhancements: Direct plugin registration and raw TCA support"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-107047-1751984817"
source: "Changelog/14.0/Feature-107047-FlexFormEnhancements.rst"
typo3-version: "14.0"
typo3-major: 14
type: "feature"
issue: 107047
forge: "https://forge.typo3.org/issues/107047"
tags: ["Backend", "FlexForm", "TCA", "ext:core"]
rendered: "2026-10-01T19:27:47+00:00"
---

# Feature: #107047 - FlexForm enhancements: Direct plugin registration and raw TCA support {#feature-107047-1751984817}

See [forge#107047](https://forge.typo3.org/issues/107047)

## FlexForm direct plugin registration {#flexform-direct-plugin-registration}

The methods `\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin()`
and `\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin()` have been
extended to accept a FlexForm definition directly via an additional `$flexForm`
argument.

This new argument allows extensions to provide the FlexForm data structure when
registering a plugin. The FlexForm can either be a reference to a FlexForm
XML file (for example, `FILE:EXT:my_extension/Configuration/FlexForm.xml`) or
the XML content itself.

This simplifies configuration and avoids the need to define the FlexForm separately
in TCA.

## Examples {#examples}

**Direct FlexForm plugin registration**

**EXT:my_extension/Configuration/TCA/Overrides/tt_content.php**

```php
ExtensionUtility::registerPlugin(
    'MyExtension',
    'MyPlugin',
    'My Plugin Title',
    'my-extension-icon',
    'plugins',
    'Plugin description',
    'FILE:EXT:my_extension/Configuration/FlexForm.xml'
);
```

Alternatively, using `addPlugin()` when not using Extbase:

**EXT:my_extension/Configuration/TCA/Overrides/tt_content.php**

```php
ExtensionManagementUtility::addPlugin(
    [
        'My Plugin Title',
        'my_plugin',
        'my-extension-icon'
    ],
    'FILE:EXT:my_extension/Configuration/FlexForm.xml'
);
```

Internally, this adds the FlexForm definition to the `ds` option of the plugin
via the `columnsOverrides` configuration and also adds the `pi_flexform`
field to the `showitem` list. For more information, see
[Breaking: #107047 - Remove pointer field functionality of TCA flex](https://docs.typo3.org/permalink/changelog:breaking-107047-1751982363), which describes the migration of the `ds`
option from multi-entry to single-entry.

## FlexFormTools schema parameter requirement {#flexformtools-schema-parameter-requirement}

The service `\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools`
has been refactored to remove its dependency on `$GLOBALS['TCA']`, which caused
architectural issues.

The following methods now support an explicit `$schema` parameter that accepts
either a `\TYPO3\CMS\Core\Schema\TcaSchema` object or a raw TCA
configuration array:

-   `getDataStructureIdentifier()`
-   `parseDataStructureByIdentifier()`
-   `cleanFlexFormXML()`

Previously, these methods had no schema parameter and relied on
`$GLOBALS['TCA']` internally, which was problematic during schema building.

Calling code must now explicitly provide schema data, either as:

-   A resolved `\TYPO3\CMS\Core\Schema\TcaSchema` object (for normal usage)
-   A raw TCA configuration array (for schema building contexts)

This architectural improvement eliminates circular dependencies and allows
`\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools` to be used
during schema building processes where TCA Schema
objects are not yet available, resolving issues in components such as the
`\TYPO3\CMS\Core\Schema\RelationMapBuilder`.

**FlexFormTools with TCA Schema**

**Example using TCA Schema**

```php
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);

// Using TCA Schema object
$tcaSchema = $tcaSchemaFactory->get('tt_content');
$identifier = $flexFormTools->getDataStructureIdentifier(
    $fieldTca,
    'tt_content',
    'pi_flexform',
    $row,
    $tcaSchema
);
```

**FlexFormTools with raw TCA array**

**Example using raw TCA configuration**

```php
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);

// Using raw TCA configuration array
$rawTca = $fullTca['tt_content'];
$identifier = $flexFormTools->getDataStructureIdentifier(
    $fieldTca,
    'tt_content',
    'pi_flexform',
    $row,
    $rawTca
);
```

**Schema building context**

**Example usage in RelationMapBuilder**

```php
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
use TYPO3\CMS\Core\Utility\GeneralUtility;

// In RelationMapBuilder - previously not possible
$flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);

foreach ($tca as $table => $tableConfig) {
    foreach ($tableConfig['columns'] ?? [] as $fieldName => $fieldConfig) {
        if ($fieldConfig['config']['type'] === 'flex') {
            // Can now use raw TCA during schema building
            $dataStructure = $flexFormTools->parseDataStructureByIdentifier(
                $identifier,
                $tableConfig // Raw TCA array
            );
        }
    }
}
```

## Impact {#impact}

**Direct FlexForm plugin registration**

This enhancement simplifies plugin configuration and FlexForm integration, as
FlexForms can now be registered directly with the plugin. The call
`ExtensionManagementUtility::addPiFlexFormValue()` is no longer required.
This method has been deprecated; see [Deprecation: #107047 - ExtensionManagementUtility::addPiFlexFormValue()](https://docs.typo3.org/permalink/changelog:deprecation-107047-1751984220).

**FlexFormTools schema support**

The service now automatically detects the input type and uses the appropriate
resolution strategy for both TCA Schema objects and raw TCA arrays. It no longer
relies on `$GLOBALS['TCA']`, allowing direct control over the service and
making it usable during schema building where no TCA Schema is available.

**Technical details**

The service uses PHP union types (`array|TcaSchema`) and automatically routes
to the appropriate internal methods. Both input types produce identical normalized
output, ensuring consistent data structures for all
`\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools` consumers.
