diff --git a/Classes/Controller/SearchController.php b/Classes/Controller/SearchController.php index 76e201178..3e6a0d6ff 100644 --- a/Classes/Controller/SearchController.php +++ b/Classes/Controller/SearchController.php @@ -22,6 +22,7 @@ use TYPO3\CMS\Extbase\Mvc\Web\Response; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Fluid\View\TemplateView; +use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor; /** * Class SearchController @@ -36,6 +37,19 @@ class SearchController extends AbstractBaseController */ protected $view; + /** + * @var ContentDataProcessor + */ + protected $contentDataProcessor; + + /** + * @param ContentDataProcessor $contentDataProcessor + */ + public function injectContentDataProcessor(ContentDataProcessor $contentDataProcessor) + { + $this->contentDataProcessor = $contentDataProcessor; + } + /** * Provide search query in extbase arguments. */ @@ -113,6 +127,11 @@ public function resultsAction() ]; $values = $this->emitActionSignal(__CLASS__, __FUNCTION__, [$values]); + $values = $this->contentDataProcessor->process( + $this->getContentObjectRenderer(), + $this->typoScriptConfiguration->getValueByPathOrDefaultValue("plugin.tx_solr.search.results.",[]), + $values + ); $this->view->assignMultiple($values); } catch (SolrUnavailableException $e) { diff --git a/Configuration/TypoScript/Examples/DataProcessing/setup.txt b/Configuration/TypoScript/Examples/DataProcessing/setup.txt new file mode 100644 index 000000000..2bf763385 --- /dev/null +++ b/Configuration/TypoScript/Examples/DataProcessing/setup.txt @@ -0,0 +1,8 @@ +plugin.tx_solr.search.results { + dataProcessing { + 10 = MyNamespace\DataProcessing\MyDataProcessor + 10 { + my_option = my_value + } + } +}