LinkHandlerInterface extends LinkHandlerInterface
Interface for link handlers displayed in the LinkBrowser.
since TYPO3 v12, will be removed in TYPO3 v13
Table of Contents
Methods
- 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
- Initialize the handler
- isUpdateSupported() : bool
- Return TRUE if the handler supports to update a link.
- modifyLinkAttributes() : array<string|int, string>
- render() : string
- Render the link handler. Ideally this modifies the view, but it can also render content directly.
Methods
canHandleLink()
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
boolformatCurrentUrl()
Format the current link for HTML output
public
formatCurrentUrl() : string
Return values
stringgetBodyTagAttributes()
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>initialize()
Initialize the handler
public
initialize(AbstractLinkBrowserController $linkBrowser, string $identifier, array<string|int, mixed> $configuration) : mixed
Parameters
- $linkBrowser : AbstractLinkBrowserController
- $identifier : string
- $configuration : array<string|int, mixed>
-
Page TSconfig of this link handler: TCEMAIN.linkHandler.
.configuration
isUpdateSupported()
Return TRUE if the handler supports to update a link.
public
isUpdateSupported() : bool
This is useful for file or page links, when only attributes are changed.
Return values
boolmodifyLinkAttributes()
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. Ideally this modifies the view, but it can also render content directly.
public
render(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface