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

Public Member Functions

 __construct (private array $resultArray, private readonly string $tableName, private readonly string $fieldName, private readonly array $databaseRow, private readonly array $fieldConfig, private readonly string $formFieldIdentifier, private readonly string $formFieldName,)
 
 getResultArray ()
 
 setResultArray (array $resultArray)
 
 getControls ()
 
 setControls (array $controls)
 
 addControl (string $control, string $identifier='')
 
 removeControl (string $identifier)
 
 getTableName ()
 
 getFieldName ()
 
 getDatabaseRow ()
 
 getFieldConfig ()
 
 getFormFieldIdentifier ()
 
 getFormFieldName ()
 

Private Attributes

array $controls = []
 

Detailed Description

Listeners to this Event will be able to add custom controls to a TCA type="file" field in FormEngine

Definition at line 23 of file CustomFileControlsEvent.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::__construct ( private array  $resultArray,
private readonly string  $tableName,
private readonly string  $fieldName,
private readonly array  $databaseRow,
private readonly array  $fieldConfig,
private readonly string  $formFieldIdentifier,
private readonly string  $formFieldName 
)

Definition at line 27 of file CustomFileControlsEvent.php.

Member Function Documentation

◆ addControl()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::addControl ( string  $control,
string  $identifier = '' 
)

◆ getControls()

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

◆ getDatabaseRow()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getDatabaseRow ( )

Definition at line 89 of file CustomFileControlsEvent.php.

◆ getFieldConfig()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getFieldConfig ( )

Definition at line 94 of file CustomFileControlsEvent.php.

◆ getFieldName()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getFieldName ( )

Definition at line 84 of file CustomFileControlsEvent.php.

◆ getFormFieldIdentifier()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getFormFieldIdentifier ( )

Definition at line 99 of file CustomFileControlsEvent.php.

◆ getFormFieldName()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getFormFieldName ( )

Definition at line 104 of file CustomFileControlsEvent.php.

◆ getResultArray()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getResultArray ( )

Definition at line 37 of file CustomFileControlsEvent.php.

◆ getTableName()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::getTableName ( )

Definition at line 79 of file CustomFileControlsEvent.php.

◆ removeControl()

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

◆ setControls()

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

◆ setResultArray()

TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::setResultArray ( array  $resultArray)

WARNING: Modifying the result array should be used with care. It mostly only exists to allow additional $resultArray['javaScriptModules'].

Definition at line 46 of file CustomFileControlsEvent.php.

Referenced by TYPO3\CMS\Backend\Tests\Functional\Form\Container\FilesControlContainerTest\customFileControlsEventIsCalled().

Member Data Documentation

◆ $controls

array TYPO3\CMS\Backend\Form\Event\CustomFileControlsEvent::$controls = []
private