getCachedSearchResults($SearchParams); if (is_null($SearchResults)) { $SearchResults = $Engine->search($SearchParams); $Plugin->cacheSearchResults( $SearchParams, $SearchResults ); } return array_intersect_key( $SearchResults, array_fill_keys($AllItemIds, true) ); } /** * Get HTML for browsing records by subject area. * @param string $LaunchId LaunchId for current page. * @param string $BaseLink Base link for page. * @param array $AllItemIds IDs of all publicly visible items that * could be shown via the current page. * @return string Html */ function getBrowsingHtml( string $LaunchId, string $BaseLink, array $AllItemIds ) : string { $Plugin = EduLink::getInstance(); $BrowsingFieldId = $Plugin->getConfigSetting("BrowsingField"); if (strlen($BrowsingFieldId) == 0) { return ""; } $Html = $Plugin->getCachedSubjectListHtml($AllItemIds); if (!is_null($Html)) { return str_replace("X-LAUNCHID-X", $LaunchId, $Html); } $Html = ""; $Plugin->cacheSubjectListHtml( $AllItemIds, str_replace($LaunchId, "X-LAUNCHID-X", $Html) ); return $Html; } # ----- SETUP ---------------------------------------------------------------- if (!isset($H_AllRecords)) { throw new Exception("H_AllRecords not defined."); } if (!isset($H_BaseLink)) { throw new Exception("H_BaseLink not defined."); } if (!isset($H_LaunchId)) { throw new Exception("H_LaunchId not defined."); } if (!isset($H_SearchParams)) { throw new Exception("H_SearchParams not defined."); } if (!isset($H_SearchParamsProvided)) { throw new Exception("H_SearchParamsProvided not defined."); } if (!isset($H_SelectedRecordIds)) { throw new Exception("H_SelectedRecordIds not defined."); } if (!isset($H_Records)) { throw new Exception("H_Records not defined."); } if (!isset($H_TransportUI)) { throw new Exception("H_TransportUI not defined."); } if (!isset($H_FacetUI)) { throw new Exception("H_FacetUI not defined."); } $AF = ApplicationFramework::getInstance(); $Plugin = EduLink::getInstance(); $User = User::getCurrentUser(); $Keywords = implode(" ", $H_SearchParams->getKeywordSearchStrings()); $IconFiles = [ 'ArrowUpInsideCircle.svg', 'Bullhorn2.svg', 'SearchResults.svg', 'Meeple.svg', 'OpenFolder.svg', ]; foreach ($IconFiles as $IconFile) { $AF->doNotUrlFingerprint($IconFile); } $SelectionUI = new ResourceSelectionUI( $H_Records, $H_SelectedRecordIds ); $SearchButton = new HtmlButton(""); $SearchButton->setIcon("MagnifyingGlass.svg"); $SearchButton->setValue("Search"); $SearchButton->setAriaLabel("Search"); # ----- DISPLAY -------------------------------------------------------------- // phpcs:disable Generic.Files.LineLength.MaxExceeded // phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect // phpcs:disable Squiz.WhiteSpace.ScopeClosingBrace.Indent include($AF->gUIFile("EduLink-StdPageStart.html")); ?>
selectedRecordListHtml() ?>

gUIFile('SearchResults.svg')) ?> Search Results

0) { ?>

itemCount() ?> results for

display() ?>

gUIFile('Bullhorn2.svg')) ?> New Resources

recordListHtml() ?>
gUIFile("EduLink-StdPageEnd.html"));