How can I autoload a hook in TYPO3?
I register it in the ext_localconf.php
, but it does not get autoloaded (unless I 'include' it in the same file which is of course an extremely ugly solution).
I looked into other extensions but I don't find, where the require there hooks.
Shouldn't it be autoloaded in the ext_emconf?
'autoload' => [
'psr-4' => [
'ID\\IndexedSearchAutocomplete\\' => 'Classes'
],
],
But when don't use my ugly solution I get the error, that GeneralUtility::makeInstance can't find my file.
Does this help? http://insight.helhum.io/post/130876393595/how-to-configure-class-loading-for-extensions-in
This article describes the options you have regarding class loading.
You may want to check whether your class fulfills the psr-4 standard: http://www.php-fig.org/psr/psr-4/