Project

General

Profile

Actions

Bug #85834

closed

ext:indexed_search - getDisplayResults protected

Added by Stefan Maischner over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-08-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

  1. 280
    if ($hookObj = $this->hookRequest('getDisplayResults')) {
  1. 329
    protected function getDisplayResults($searchWords, $resultData, $freeIndexUid = -1)

Bitte wieder auf public setzen. Danke!

Actions #1

Updated by Wouter Wolters over 6 years ago

  • Status changed from New to Needs Feedback

Please use english. TYPO3 is not only german ;) Thanks.

Actions #2

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.

Actions #3

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

Actions #4

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.

Actions

Also available in: Atom PDF