Feature: #82488 - Possibility to modify the display results before FluidView assignment

See forge#82488

Description

To manipulate the data of the search results prior to rendering them in the frontend a hook has been introduced at the end of the getDisplayResults() method, called getDisplayResults_postProc. The hook can modify all data just before it is passed to fluid.

Basic Usage

Registration of the new hook in ext_localconf.php of your custom extension.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['pi1_hooks']['getDisplayResults_postProc'] = \Vendor\ExtensionName\Hooks\CustomHook::class;

CustomHook class example \Vendor\ExtensionName\Hooks\CustomHook

<?php
declare(strict_types = 1);
namespace Vendor\ExtensionName\Hooks;

class CustomHook
{
   /**
   * @param array $result
   * @return array
   */
    public function getDisplayResults_postProc(array $result): array
    {
        if ($result['count'] > 0) {
            foreach($result['rows'] as $rowIndex => $row) {
                $result['rows'][$rowIndex]['description'] = \str_replace('foo', 'bar', $row['description']);
            }
        }
        return $result;
    }
}