[FEATURE] Add preProcessStorage signal to ResourceFactory
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-72904-AddPreProcessStorageSignalToResourceFactory.rst
1 =================================================================
2 Feature: #72904 - Add preProcessStorage signal to ResourceFactory
3 =================================================================
4
5 Description
6 ===========
7
8 This patch introduces a new signal before a resource storage is initialized.
9
10 Register the class which implements your logic in ``ext_localconf.php``:
11
12 .. code-block:: php
13
14    $dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
15    $dispatcher->connect(
16        \TYPO3\CMS\Core\Resource\ResourceFactory::class,
17        ResourceFactoryInterface::SIGNAL_PreProcessStorage,
18        \MY\ExtKey\Slots\ResourceFactorySlot::class,
19        'preProcessStorage'
20    );
21
22 The method is called with the following arguments:
23
24 * int ``$uid`` the uid of the record
25 * array ``$recordData`` all record data as array
26 * string ``$fileIdentifier`` the file identifier