linkAttributes, true); if ($position !== false) { unset($this->linkAttributes[$position]); } } } /** * 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 */ public function canHandleLink(array $linkParts): bool { if (isset($linkParts['url']['telephone'])) { $this->linkParts = $linkParts; return true; } return false; } /** * Format the current link for HTML output */ public function formatCurrentUrl(): string { return $this->linkParts['url']['telephone']; } /** * Render the link handler */ public function render(ServerRequestInterface $request): string { $this->pageRenderer->loadJavaScriptModule('@typo3/backend/telephone-link-handler.js'); $this->view->assign('telephone', !empty($this->linkParts) ? $this->linkParts['url']['telephone'] : ''); return $this->view->render('LinkBrowser/Telephone'); } /** * @return string[] Array of body-tag attributes */ public function getBodyTagAttributes(): array { return []; } }