ModifyFileReferenceControlsEvent¶
New in version 12.0.
Listeners to the PSR-14 event
\TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceControlsEvent
are able to modify the controls of a single file reference of a TCA type
file field. This event is similar to the
ModifyInlineElementControlsEvent, which is only available for TCA
type inline.
API¶
- class TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceControlsEvent¶
Listeners to this Event will be able to modify the controls of a single file reference of a TCA type=file field.
- getControls()¶
Returns all controls with their markup
- Return type
array
- setControls(array $controls)¶
Overwrite the controls
- Parameters
$controls (
array
) -- the controls
- getControl(string $identifier)¶
Returns the markup for the requested control
- Parameters
$identifier (
string
) -- the identifier
- Return type
string
- setControl(string $identifier, string $markup)¶
Set a control with the given identifier and markup IMPORTANT: Overwrites an existing control with the same identifier
- Parameters
$identifier (
string
) -- the identifier$markup (
string
) -- the markup
- hasControl(string $identifier)¶
Returns whether a control exists for the given identifier
- Parameters
$identifier (
string
) -- the identifier
- Return type
bool
- removeControl(string $identifier)¶
Removes a control from the file reference, if it exists
- Parameters
$identifier (
string
) -- the identifier
- Return type
bool
- Returns
Whether the control could be removed
- getElementData()¶
Returns the whole element data
- Return type
array
- getRecord()¶
Returns the current record, the controls are created for
- Return type
array
- getParentUid()¶
Returns the uid of the parent (embedding) record (uid or NEW...)
- Return type
string
- getForeignTable()¶
Returns the table (foreign_table) the controls are created for
- Return type
string
- getFieldConfiguration()¶
Returns the TCA configuration of the TCA type=file field
- Return type
array
- isVirtual()¶
Returns whether the current records is only virtually shown and not physically part of the parent record
- Return type
bool