linkAttributes[array_search('params', $this->linkAttributes, true)]); } /** * Checks if this is the handler for the given link * * The handler may store this information locally for later usage. * * @param array $linkParts Link parts as returned from TypoLinkCodecService * * @return bool */ public function canHandleLink(array $linkParts) { if (!isset($linkParts['url']['url'])) { return false; } $linkParts['url'] = $linkParts['url']['url']; $this->linkParts = $linkParts; return true; } /** * Format the current link for HTML output * * @return string */ public function formatCurrentUrl() { return $this->linkParts['url']; } /** * Render the link handler */ public function render(ServerRequestInterface $request) { $this->pageRenderer->loadJavaScriptModule('@typo3/backend/url-link-handler.js'); $this->view->assign('url', !empty($this->linkParts) ? $this->linkParts['url'] : ''); return $this->view->render('LinkBrowser/Url'); } /** * @return string[] Array of body-tag attributes */ public function getBodyTagAttributes() { return []; } }