TcaColumnsRemoveEmptyRelations

readonly class \TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsRemoveEmptyRelations

Implements
FormDataProviderInterface

Remove or disable fields (select, category, language) in the form when no selectable items are available, or when only a single choice exists (language fields).

For regular users, the field is removed entirely. When backend debug mode is enabled ($GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] = true), the field is kept as readOnly with an info badge, so admins can identify configuration issues such as missing records or restrictive TSconfig.

Existing database values are not affected: fields not rendered in the form are simply not submitted, so DataHandler preserves their stored values.

Tree providers supply an internal _hasSelectableItems flag so the initial visibility check does not require a fully resolved item list.

Fields can opt out via TCA config 'showIfEmpty' => true.

Table of Contents

Interfaces

FormDataProviderInterface
Interface must be implemented by form data provider classes.

Methods

addData()  : array
Add form data to result array

Methods

addData()

Add form data to result array

public addData(array $result) : array

Parameters

$result : array

Initialized result array

Return values

array —

Result filled with more data

On this page