diff --git a/module/finc/src/finc/Controller/MyResearchController.php b/module/finc/src/finc/Controller/MyResearchController.php index e8421dfb60a4cfd915adf665e226b5cb01baa229..349272d89a6687846e6ef7f1f3fd949376336df8 100644 --- a/module/finc/src/finc/Controller/MyResearchController.php +++ b/module/finc/src/finc/Controller/MyResearchController.php @@ -123,7 +123,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple // If we got this far, we just need to display the favorites: try { - $runner = $this->serviceLocator->get('VuFind\Search\SearchRunner'); + $runner = $this->serviceLocator->get(\VuFind\Search\SearchRunner::class); // We want to merge together GET, POST and route parameters to // initialize our search object: @@ -133,7 +133,7 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple // Set up listener for recommendations: $rManager = $this->serviceLocator - ->get('VuFind\Recommend\PluginManager'); + ->get(\VuFind\Recommend\PluginManager::class); $setupCallback = function ($runner, $params, $searchId) use ($rManager) { $listener = new RecommendListener($rManager, $searchId); $listener->setConfig( @@ -143,8 +143,17 @@ class MyResearchController extends \VuFind\Controller\MyResearchController imple }; $results = $runner->run($request, 'Favorites', $setupCallback); + $listTags = []; + + if ($this->listTagsEnabled()) { + if ($list = $results->getListObject()) { + foreach ($list->getListTags() as $tag) { + $listTags[$tag->id] = $tag->tag; + } + } + } return $this->createViewModel( - ['params' => $results->getParams(), 'results' => $results, 'context' => "favorite"] + ['params' => $results->getParams(), 'results' => $results, 'listTags' => $listTags, 'context' => "favorite"] ); } catch (ListPermissionException $e) {