UrlLinkHandler extends AbstractLinkHandler implements LinkHandlerInterface

Link to an arbitrary external URL.

Internal

This class is a specific LinkHandler implementation and is not part of the TYPO3's Core API.

Table of Contents

Interfaces

LinkHandlerInterface
Interface for link handlers displayed in the LinkBrowser.

Properties

$iconFactory  : IconFactory
$linkAttributes  : array<string|int, string>
Available additional link attributes
$linkBrowser  : AbstractLinkBrowserController
$linkParts  : array<string|int, mixed>
Parts of the current link
$pageRenderer  : PageRenderer
$updateSupported  : bool
We don't support updates since there is no difference to simply set the link again.
$view  : ViewInterface

Methods

__construct()  : mixed
Constructor
canHandleLink()  : bool
Checks if this is the handler for the given link
formatCurrentUrl()  : string
Format the current link for HTML output
getBodyTagAttributes()  : array<string|int, string>
getLinkAttributes()  : array<string|int, mixed>
initialize()  : mixed
isUpdateSupported()  : bool
Return TRUE if the handler supports to update a link.
modifyLinkAttributes()  : array<string|int, string>
render()  : string
Render the link handler
setView()  : void
getBackendUser()  : BackendUserAuthentication
getLanguageService()  : LanguageService

Properties

$linkAttributes

Available additional link attributes

protected array<string|int, string> $linkAttributes = ['target', 'title', 'class', 'params', 'rel']

'rel' only works in RTE, still we have to declare support for it.

$linkParts

Parts of the current link

protected array<string|int, mixed> $linkParts = []

$updateSupported

We don't support updates since there is no difference to simply set the link again.

protected bool $updateSupported = false

Methods

__construct()

Constructor

public __construct() : mixed

Checks if this is the handler for the given link

public canHandleLink(array<string|int, mixed> $linkParts) : bool

The handler may store this information locally for later usage.

Parameters
$linkParts : array<string|int, mixed>

Link parts as returned from TypoLinkCodecService

Return values
bool

formatCurrentUrl()

Format the current link for HTML output

public formatCurrentUrl() : string
Return values
string

getBodyTagAttributes()

public getBodyTagAttributes() : array<string|int, string>
Return values
array<string|int, string>

Array of body-tag attributes

getLinkAttributes()

public getLinkAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

isUpdateSupported()

Return TRUE if the handler supports to update a link.

public isUpdateSupported() : bool

This is useful for e.g. file or page links, when only attributes are changed.

Return values
bool

modifyLinkAttributes()

public modifyLinkAttributes(array<string|int, string> $fieldDefinitions) : array<string|int, string>
Parameters
$fieldDefinitions : array<string|int, string>

Array of link attribute field definitions

Return values
array<string|int, string>

render()

Render the link handler

public render(ServerRequestInterface $request) : string
Parameters
$request : ServerRequestInterface
Return values
string

        
On this page

Search results