‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceEnabledControlsEvent 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 a file reference

Definition at line 23 of file ModifyFileReferenceEnabledControlsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 30 of file ModifyFileReferenceEnabledControlsEvent.php.

Member Function Documentation

◆ disableControl()

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

Disable a control, if it exists

Returns
‪bool Whether the control could be disabled

Definition at line 57 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ enableControl()

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

Enable a control, if it exists

Returns
‪bool Whether the control could be enabled

Definition at line 42 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ getControlsState()

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

Returns all controls with their state (enabled or disabled)

Definition at line 87 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ getElementData()

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

Returns the whole element data

Definition at line 103 of file ModifyFileReferenceEnabledControlsEvent.php.

◆ getEnabledControls()

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

Returns all enabled controls

Definition at line 95 of file ModifyFileReferenceEnabledControlsEvent.php.

◆ getFieldConfiguration()

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

Returns the TCA configuration of the TCA type=file field

Definition at line 135 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ getForeignTable()

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

Returns the table (foreign_table) the controls are created for

Definition at line 127 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ getParentUid()

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

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

Definition at line 119 of file ModifyFileReferenceEnabledControlsEvent.php.

◆ getRecord()

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

Returns the current record of the controls are created for

Definition at line 111 of file ModifyFileReferenceEnabledControlsEvent.php.

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

◆ hasControl()

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

◆ isControlEnabled()

TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceEnabledControlsEvent::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 ModifyFileReferenceEnabledControlsEvent.php.

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

◆ isVirtual()

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

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

Definition at line 143 of file ModifyFileReferenceEnabledControlsEvent.php.

Member Data Documentation

◆ $controlsState

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