mode = $request->getQueryParams()['mode'] ?? $request->getQueryParams()['mode'] ?? ''; return new HtmlResponse($this->main($request)); } /** * Main function, detecting the current mode of the element browser and branching out to internal methods. * * @return string HTML content */ protected function main(ServerRequestInterface $request) { $browser = $this->elementBrowserRegistry->getElementBrowser($this->mode); if (is_callable([$browser, 'setRequest'])) { $browser->setRequest($request); } $backendUser = $this->getBackendUser(); $modData = $backendUser->getModuleData('browse_links.php', 'ses'); [$modData] = $browser->processSessionData($modData); $backendUser->pushModuleData('browse_links.php', $modData); return $browser->render(); } protected function getBackendUser(): BackendUserAuthentication { return $GLOBALS['BE_USER']; } }