#109143Inspector Editor Registry for the Form Framework
Description
The TYPO3 form framework’s backend editor uses “inspector editors” — configurable UI widgets that allow editors to modify form element properties (text fields, select lists, property grids, etc.). The behavior of these editors is currently defined implicitly through YAML `templateName` values, with the corresponding PHP logic hard-coded across multiple extractor classes.
This creates two key problems:
- Extension developers cannot create custom inspector editors with multi-value property support.** The framework only recognizes a fixed list of five `templateName` values as multi-value capable. Any custom editor that handles arrays, key/value pairs, or dynamic option sets is rejected by the form definition validation — there is no way to register new multi-value editors.
- Editor behavior is scattered and duplicated.** Whether an editor supports multi-value properties, rich text, or collection scoping is determined by `if/else` chains checking `templateName` strings in at least six different PHP files. Adding or changing editor behavior requires modifications in multiple unrelated locations.
Proposed Solution
Introduce a PHP-based inspector editor registry that allows each inspector editor to be represented as a PHP class declaring its own capabilities. The registry replaces all hard-coded `templateName` checks with a single lookup mechanism.
Core Concepts
- PHP attribute for registration: A new `#[AsFormInspectorEditor]` attribute marks a class as an inspector editor. The Symfony DI container discovers and collects these classes automatically at compile time — no manual `Services.yaml` wiring needed.
- `InspectorEditorInterface`: Each editor class implements a contract that describes its behavior: * Which property paths have multi-value semantics * Whether multi-value properties are scoped to validator/finisher collections * Whether the editor supports CKEditor rich text * How property paths with placeholders are expanded to concrete paths * How select option paths are resolved * Which Fluid partial renders the editor’s HTML
- `AbstractInspectorEditor` base class: Provides sensible defaults so that simple editors only need to implement `getFluidPartialName()`. Complex editors override specific methods to declare their behavior.
- `InspectorEditorRegistry`: A central, immutable registry populated at container compile time. All extractors and services query this registry instead of checking `templateName` strings directly.
What Changes for Existing Code
- All existing extractor classes (`MultiValuePropertiesExtractor`, `SelectOptionsExtractor`, `IsCreatablePropertyCollectionElementExtractor`, `PropertyPathsExtractor`, etc.) are refactored to use the registry instead of hard-coded conditionals.
- The `FormDefinitionConversionService` and `FormEditorEnrichmentService` use the registry for rich text detection and partial resolution.
- All 17 built-in inspector editors are migrated to PHP classes.
What Changes for Extension Developers
- Custom inspector editors can now fully participate in multi-value property validation, rich text enrichment, and property path processing by implementing the interface.
- The `formEditorPartials` YAML key becomes unnecessary for inspector editors — the Fluid partial path is resolved from the PHP class. Existing YAML entries still work but are deprecated.
- The existing YAML-based `templateName` configuration remains the way editors are referenced in form definitions. The PHP class is purely additive metadata.
Backward Compatibility
- All existing YAML form configurations continue to work without changes.
- Editors not found in the registry fall back to the previous behavior (property path used as-is, no multi-value support). This ensures third-party editors that have not yet migrated to the new mechanism remain functional.
- `Inspector-*` entries in `formEditorPartials` trigger a deprecation log and will be removed in v15. Non-inspector entries (`FormElement-*`, `Modal-*`) are unaffected.
Reviews 1
Related issues 1
History 17
-
Gerrit Code Review pushed patch set 1 for main to change 93046 status
NewUnder Review <span data-processor="relativetime" data-value="2026-03-03T19:12:46+00:00" > 03/03/26, 19:12 </span> -
Gerrit Code Review pushed patch set 2 for main to change 93046 <span data-processor="relativetime" data-value="2026-03-03T19:26:19+00:00" > 03/03/26, 19:26 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 93046 <span data-processor="relativetime" data-value="2026-03-03T20:45:34+00:00" > 03/03/26, 20:45 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 93046 <span data-processor="relativetime" data-value="2026-03-04T06:23:04+00:00" > 03/04/26, 06:23 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 93046 <span data-processor="relativetime" data-value="2026-03-04T16:26:37+00:00" > 03/04/26, 16:26 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 93046 <span data-processor="relativetime" data-value="2026-03-04T16:28:08+00:00" > 03/04/26, 16:28 </span>
-
Josua Vogel changed Related to #105440 <span data-processor="relativetime" data-value="2026-03-06T07:50:45+00:00" > 03/06/26, 07:50 </span>