[TASK] Provide record's uid to the suggest wizard 91/57691/2
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:19:22 +0000 (17:19 +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/57691
Tested-by: TYPO3com <no-reply@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 10ae2c4..6641fb3 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;