I`m using fal_securedownload 1.1.0 and TYPO3 7.6.12 and i want to log the downloads via the Slot BeforeFileDump.
In my Extension I have a ext_localconf.php
contents this:
<?php
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
$signalSlotDispatcher->connect(
'BeechIt\\FalSecuredownload\\Hooks\\FileDumpHook',
'BeforeFileDump',
'MyVendor\\MyExtension\\Slot\\LogFileDump',
'logFileDump'
);
?>
and in Classes/Slot i have a LogFileDump.php contents this:
<?php
namespace MyVendor\MyExtension\Slot;
/**
* Class LogFileDump
* @package MyVendor\MyExtension\Slot
*/
class LogFileDump {
public function logFileDump($file,$this) {
var_dump($file);
var_dump($this);
}
}
?>
When I test this I got the Error:
The given class "MyVendor\MyExtension\Slot\CallUrl" is not a registered object.
Why I thought TYPO3 loads my Class automatically because of the namespace.
Did anybody has an Idea what's wrong with my Code
My Solution was to put a composer.json into my Extension Directory. This loads the Classes correctly