ModifyInlineElementEnabledControlsEvent

New in version 12.0

This event, together with ModifyInlineElementControlsEvent, serves as a more powerful and flexible replacement for the removed hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook']

The PSR-14 event \TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent is called before any control markup is generated. It can be used to enable or disable each control. With this event it is therefore possible to enable a control, which is disabled in TCA, only for some use case.

See the ModifyInlineElementControlsEvent example for details.

Example

API

class ModifyInlineElementEnabledControlsEvent
Fully qualified name
\TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent

Listeners to this Event will be able to modify the state (enabled or disabled) for controls of an inline element

enableControl ( string $identifier)

Enable a control, if it exists

param $identifier

the identifier

Returns
bool Whether the control could be enabled
disableControl ( string $identifier)

Disable a control, if it exists

param $identifier

the identifier

Returns
bool Whether the control could be disabled
hasControl ( string $identifier)

Returns whether a control exists for the given identifier

param $identifier

the identifier

Returns
bool
isControlEnabled ( string $identifier)

Returns whether the control is enabled.

Note: Will also return FALSE in case no control exists for the requested identifier

param $identifier

the identifier

Returns
bool
getControlsState ( )

Returns all controls with their state (enabled or disabled)

Returns
array
getEnabledControls ( )

Returns all enabled controls

Returns
array
getElementData ( )

Returns the whole element data

Returns
array
getRecord ( )

Returns the current record of the controls are created for

Returns
array
getParentUid ( )

Returns the uid of the parent (embedding) record (uid or NEW...)

Returns
string
getForeignTable ( )

Returns the table (foreign_table) the controls are created for

Returns
string
getFieldConfiguration ( )

Returns the TCA configuration of the inline record field

Returns
array
isVirtual ( )

Returns whether the current records is only virtually shown and not physically part of the parent record

Returns
bool