‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent Class Reference

Public Member Functions

 __construct (private readonly array $data, private readonly array $record,)
 
bool enableControl (string $identifier)
 
bool disableControl (string $identifier)
 
 hasControl (string $identifier)
 
 isControlEnabled (string $identifier)
 
 getControlsState ()
 
 getEnabledControls ()
 
 getElementData ()
 
 getRecord ()
 
 getParentUid ()
 
 getForeignTable ()
 
 getFieldConfiguration ()
 
 isVirtual ()
 

Private Attributes

array $controlsState
 

Detailed Description

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

Definition at line 23 of file ModifyInlineElementEnabledControlsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::__construct ( private readonly array  $data,
private readonly array  $record 
)

Definition at line 30 of file ModifyInlineElementEnabledControlsEvent.php.

Member Function Documentation

◆ disableControl()

bool TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::disableControl ( string  $identifier)

Disable a control, if it exists

Returns
‪bool Whether the control could be disabled

Definition at line 57 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent\hasControl().

◆ enableControl()

bool TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::enableControl ( string  $identifier)

Enable a control, if it exists

Returns
‪bool Whether the control could be enabled

Definition at line 42 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent\hasControl().

◆ getControlsState()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getControlsState ( )

Returns all controls with their state (enabled or disabled)

Definition at line 87 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent\$controlsState.

◆ getElementData()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getElementData ( )

Returns the whole element data

Definition at line 103 of file ModifyInlineElementEnabledControlsEvent.php.

◆ getEnabledControls()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getEnabledControls ( )

Returns all enabled controls

Definition at line 95 of file ModifyInlineElementEnabledControlsEvent.php.

◆ getFieldConfiguration()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getFieldConfiguration ( )

Returns the TCA configuration of the inline record field

Definition at line 135 of file ModifyInlineElementEnabledControlsEvent.php.

Referenced by TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent\getForeignTable().

◆ getForeignTable()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getForeignTable ( )

Returns the table (foreign_table) the controls are created for

Definition at line 127 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent\getFieldConfiguration().

◆ getParentUid()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getParentUid ( )

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

Definition at line 119 of file ModifyInlineElementEnabledControlsEvent.php.

◆ getRecord()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::getRecord ( )

Returns the current record of the controls are created for

Definition at line 111 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Webhooks\Message\$record.

◆ hasControl()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::hasControl ( string  $identifier)

◆ isControlEnabled()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::isControlEnabled ( string  $identifier)

Returns whether the control is enabled. Note: Will also return FALSE in case no control exists for the requested identifier

Definition at line 79 of file ModifyInlineElementEnabledControlsEvent.php.

References TYPO3\CMS\Webhooks\Message\$identifier.

◆ isVirtual()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::isVirtual ( )

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

Definition at line 143 of file ModifyInlineElementEnabledControlsEvent.php.

Member Data Documentation

◆ $controlsState

array TYPO3\CMS\Backend\Form\Event\ModifyInlineElementEnabledControlsEvent::$controlsState
private