[TASK] Provide record's uid to the suggest wizard 89/57689/3
authorXavier Perseguers <xavier@typo3.org>
Thu, 26 Jul 2018 10:20:53 +0000 (12:20 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Thu, 26 Jul 2018 15:11:02 +0000 (17:11 +0200)
In addition to the query string, having the uid of the record allows
more flexibility when implementing a custom suggest receiver.

Releases: master, 8.7
Resolves: #85655
Change-Id: I8dea34a26b845b0a49b5406880790b55e445d780
Reviewed-on: https://review.typo3.org/57689
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/backend/Classes/Controller/Wizard/SuggestWizardController.php

index 2c2dbcc..7d95e37 100644 (file)
@@ -147,7 +147,10 @@ class SuggestWizardController
                 $receiverClassName = SuggestWizardDefaultReceiver::class;
             }
             $receiverObj = GeneralUtility::makeInstance($receiverClassName, $queryTable, $config);
-            $params = ['value' => $search];
+            $params = [
+                'value' => $search,
+                'uid' => $uid,
+            ];
             $rows = $receiverObj->queryTable($params);
             if (empty($rows)) {
                 continue;