aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Search/SearchComposer.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-08-05 09:49:18 +0200
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-08-05 12:52:16 +0000
commitea8f68bea6957ae459ff1ba6849b25354b3f0093 (patch)
treeb6523d1ad1c01e55622fd31bfcfb27daabec0593 /lib/private/Search/SearchComposer.php
parentd98f7c1bd83fc03fd297ebeac6279ffe17316950 (diff)
downloadnextcloud-server-ea8f68bea6957ae459ff1ba6849b25354b3f0093.tar.gz
nextcloud-server-ea8f68bea6957ae459ff1ba6849b25354b3f0093.zip
Hand in the route and the parameters of the request
Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'lib/private/Search/SearchComposer.php')
-rw-r--r--lib/private/Search/SearchComposer.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php
index f86626909c4..fdac9c5612a 100644
--- a/lib/private/Search/SearchComposer.php
+++ b/lib/private/Search/SearchComposer.php
@@ -109,19 +109,20 @@ class SearchComposer {
* Get a list of all provider IDs & Names for the consecutive calls to `search`
* Sort the list by the order property
*
- * @param string $from the url the user is currently at
+ * @param string $route the route the user is currently at
+ * @param array $routeParameters the parameters of the route the user is currently at
*
* @return array
*/
- public function getProviders(string $from): array {
+ public function getProviders(string $route, array $routeParameters): array {
$this->loadLazyProviders();
$providers = array_values(
- array_map(function (IProvider $provider) use ($from) {
+ array_map(function (IProvider $provider) use ($route, $routeParameters) {
return [
'id' => $provider->getId(),
'name' => $provider->getName(),
- 'order' => $provider->getOrder($from)
+ 'order' => $provider->getOrder($route, $routeParameters),
];
}, $this->providers)
);