ModifyFileReferenceEnabledControlsEvent¶
New in version 12.0
Listeners to the PSR-14 event
\TYPO3\CMS\Backend\Form\Event\ModifyFileReferenceEnabledControlsEvent
are able to modify the state (enabled or disabled) for the controls of a single
file reference of a TCA type file field. This
event is similar to the ModifyInlineElementEnabledControlsEvent, which
is only available for TCA type inline.
Example¶
Note
Currently, we do not have an example for this event. If you can provide a useful one, please open an issue with your code snippets or a pull request.
API¶
- class \TYPO3\CMS\Backend\Form\Event\ ModifyFileReferenceEnabledControlsEvent¶
-
Listeners to this Event will be able to modify the state (enabled or disabled) for controls of a file reference
- enableControl ( string $identifier) ¶
-
Enable a control, if it exists
- param string $identifier
-
the identifier
- returntype
-
bool
- Returns:
-
bool Whether the control could be enabled
- disableControl ( string $identifier) ¶
-
Disable a control, if it exists
- param string $identifier
-
the identifier
- returntype
-
bool
- Returns:
-
bool Whether the control could be disabled
- hasControl ( string $identifier) ¶
-
Returns whether a control exists for the given identifier
- param string $identifier
-
the identifier
- returntype
-
bool
- isControlEnabled ( string $identifier) ¶
-
Returns whether the control is enabled.
Note: Will also return FALSE in case no control exists for the requested identifier
- param string $identifier
-
the identifier
- returntype
-
bool
- getControlsState ( ) ¶
-
Returns all controls with their state (enabled or disabled)
- returntype
-
array
- getEnabledControls ( ) ¶
-
Returns all enabled controls
- returntype
-
array
- getElementData ( ) ¶
-
Returns the whole element data
- returntype
-
array
- getRecord ( ) ¶
-
Returns the current record of the controls are created for
- returntype
-
array
- getParentUid ( ) ¶
-
Returns the uid of the parent (embedding) record (uid or NEW...)
- returntype
-
string
- getForeignTable ( ) ¶
-
Returns the table (foreign_table) the controls are created for
- returntype
-
string
- getFieldConfiguration ( ) ¶
-
Returns the TCA configuration of the TCA type=file field
- returntype
-
array
- isVirtual ( ) ¶
-
Returns whether the current records is only virtually shown and not physically part of the parent record
- returntype
-
bool