Bug #85834
closedext:indexed_search - getDisplayResults protected
0%
Description
Es wird ein Hook für die getDisplayResults()-Methode bereitgestellt, aber sie ist als protected deklariert. Das ist leider nicht sinnvoll (im Sinne eines Hooks).
Controller/SearchController.php
- 280
if ($hookObj = $this->hookRequest('getDisplayResults')) {
- 329
protected function getDisplayResults($searchWords, $resultData, $freeIndexUid = -1)
Bitte wieder auf public setzen. Danke!
Updated by Wouter Wolters over 6 years ago
- Status changed from New to Needs Feedback
Please use english. TYPO3 is not only german ;) Thanks.
Updated by Stefan Maischner over 6 years ago
Wouter Wolters wrote:
Please use english. TYPO3 is not only german ;) Thanks.
Sure - sorry! :)
Topic of my problem:
ext:indexed_search
Controller/SearchController
Please change the visiblity of the method getDisplayResults() from "protected" to "public" - otherwise the provided hook is useless in my eyes.
I use it in this Extension and would gladly support it for V8: https://extensions.typo3.org/extension/ms_piwik_indexedsearch/
Thank you very much.
Updated by Wouter Wolters over 6 years ago
No this is not a problem, you need to implement your own hook that contains a method with that name.
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['pi1_hooks']['getDisplayResults'] = \MY\Own\Hook\ResultHook::class;
and in this class you create a public method getDisplayResults and you can add your own logic.
AFAICS this method has always been protected. https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_4-7/typo3/sysext/indexed_search/Classes/Controller/SearchController.php#L264
Updated by Wouter Wolters about 6 years ago
- Status changed from Needs Feedback to Closed
Method has always been protected. Closing this ticket as no reaction in 3 months and there is a possiblity to get this working just fine.