PageLinkHandler extends AbstractLinkHandler implements LinkHandlerInterface, LinkParameterProviderInterface
Link to a page record.
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.
- LinkParameterProviderInterface
Properties
- $expandPage : int
- $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
- $view : ViewInterface
Methods
- __construct() : mixed
- 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>
- getUrlParameters() : array<string|int, string>
- Provides an array or GET parameters for URL generation
- 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
- getRecordsOnExpandedPage() : mixed
- This adds all content elements on a page to the view and lets you create a link to the element.
- isPageLinkable() : bool
Properties
$expandPage
protected
int
$expandPage
= 0
$iconFactory
protected
IconFactory
$iconFactory
$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.
$linkBrowser
protected
AbstractLinkBrowserController
$linkBrowser
$linkParts
Parts of the current link
protected
array<string|int, mixed>
$linkParts
= []
$pageRenderer
protected
PageRenderer
$pageRenderer
$updateSupported
protected
bool
$updateSupported
= true
$view
protected
ViewInterface
$view
Methods
__construct()
public
__construct() : mixed
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>getUrlParameters()
Provides an array or GET parameters for URL generation
public
getUrlParameters(array<string|int, mixed> $values) : array<string|int, string>
Parameters
- $values : array<string|int, mixed>
-
Array of values to include into the parameters or which might influence the parameters
Return values
array<string|int, string> —Array of parameters which have to be added to URLs
initialize()
public
initialize(AbstractLinkBrowserController $linkBrowser, mixed $identifier, array<string|int, mixed> $configuration) : mixed
Parameters
- $linkBrowser : AbstractLinkBrowserController
- $identifier : mixed
- $configuration : 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
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
public
render(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
stringsetView()
public
setView(ViewInterface $view) : void
Parameters
- $view : ViewInterface
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetRecordsOnExpandedPage()
This adds all content elements on a page to the view and lets you create a link to the element.
protected
getRecordsOnExpandedPage(int $pageId) : mixed
Parameters
- $pageId : int
-
Page uid to expand
isPageLinkable()
protected
isPageLinkable(array<string|int, mixed> $page) : bool
Parameters
- $page : array<string|int, mixed>