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

Public Member Functions

 __construct (private array $controls, private readonly array $data, private readonly array $record,)
 
 getControls ()
 
 setControls (array $controls)
 
 getControl (string $identifier)
 
 setControl (string $identifier, string $markup)
 
 hasControl (string $identifier)
 
bool removeControl (string $identifier)
 
 getElementData ()
 
 getRecord ()
 
 getParentUid ()
 
 getForeignTable ()
 
 getFieldConfiguration ()
 
 isVirtual ()
 

Detailed Description

Listeners to this Event will be able to modify the controls of an inline element

Definition at line 23 of file ModifyInlineElementControlsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 25 of file ModifyInlineElementControlsEvent.php.

Member Function Documentation

◆ getControl()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent::getControl ( string  $identifier)

Returns the markup for the requested control

Definition at line 50 of file ModifyInlineElementControlsEvent.php.

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

◆ getControls()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent::getControls ( )

Returns all controls with their markup

Definition at line 34 of file ModifyInlineElementControlsEvent.php.

◆ getElementData()

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

Returns the whole element data

Definition at line 90 of file ModifyInlineElementControlsEvent.php.

◆ getFieldConfiguration()

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

Returns the TCA configuration of the inline record field

Definition at line 122 of file ModifyInlineElementControlsEvent.php.

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

◆ getForeignTable()

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

Returns the table (foreign_table) the controls are created for

Definition at line 114 of file ModifyInlineElementControlsEvent.php.

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

◆ getParentUid()

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

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

Definition at line 106 of file ModifyInlineElementControlsEvent.php.

◆ getRecord()

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

Returns the current record of the controls are created for

Definition at line 98 of file ModifyInlineElementControlsEvent.php.

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

◆ hasControl()

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

Returns whether a control exists for the given identifier

Definition at line 67 of file ModifyInlineElementControlsEvent.php.

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

Referenced by TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent\removeControl().

◆ isVirtual()

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

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

Definition at line 130 of file ModifyInlineElementControlsEvent.php.

◆ removeControl()

bool TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent::removeControl ( string  $identifier)

Removes a control from the inline element, if it exists

Returns
‪bool Whether the control could be removed

Definition at line 77 of file ModifyInlineElementControlsEvent.php.

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

◆ setControl()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent::setControl ( string  $identifier,
string  $markup 
)

Set a control with the given identifier and markup IMPORTANT: Overwrites an existing control with the same identifier

Definition at line 59 of file ModifyInlineElementControlsEvent.php.

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

◆ setControls()

TYPO3\CMS\Backend\Form\Event\ModifyInlineElementControlsEvent::setControls ( array  $controls)

Overwrite the controls

Definition at line 42 of file ModifyInlineElementControlsEvent.php.