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