‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceControlsEvent 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 a single file reference of a TCA type=file field.

Definition at line 24 of file ModifyFileReferenceControlsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 26 of file ModifyFileReferenceControlsEvent.php.

Member Function Documentation

◆ getControl()

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

Returns the markup for the requested control

Definition at line 51 of file ModifyFileReferenceControlsEvent.php.

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

◆ getControls()

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

Returns all controls with their markup

Definition at line 35 of file ModifyFileReferenceControlsEvent.php.

◆ getElementData()

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

Returns the whole element data

Definition at line 91 of file ModifyFileReferenceControlsEvent.php.

◆ getFieldConfiguration()

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

Returns the TCA configuration of the TCA type=file field

Definition at line 123 of file ModifyFileReferenceControlsEvent.php.

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

◆ getForeignTable()

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

Returns the table (foreign_table) the controls are created for

Definition at line 115 of file ModifyFileReferenceControlsEvent.php.

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

◆ getParentUid()

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

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

Definition at line 107 of file ModifyFileReferenceControlsEvent.php.

◆ getRecord()

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

Returns the current record, the controls are created for

Definition at line 99 of file ModifyFileReferenceControlsEvent.php.

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

◆ hasControl()

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

Returns whether a control exists for the given identifier

Definition at line 68 of file ModifyFileReferenceControlsEvent.php.

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

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

◆ isVirtual()

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

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

Definition at line 131 of file ModifyFileReferenceControlsEvent.php.

◆ removeControl()

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

Removes a control from the file reference, if it exists

Returns
‪bool Whether the control could be removed

Definition at line 78 of file ModifyFileReferenceControlsEvent.php.

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

◆ setControl()

TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceControlsEvent::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 60 of file ModifyFileReferenceControlsEvent.php.

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

◆ setControls()

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

Overwrite the controls

Definition at line 43 of file ModifyFileReferenceControlsEvent.php.