FileLinkHandler extends FileLinkHandler
since TYPO3 v12, will be removed in TYPO3 v13
Table of Contents
Properties
- $currentPage : int
- $displayThumbs : string|null
- $expandFolder : string|null
- $filelist : FileList|null
- $iconFactory : IconFactory
- $languageService : LanguageService
- $languageServiceFactory : LanguageServiceFactory
- $linkBrowser : AbstractLinkBrowserController
- $linkParts : array<string|int, mixed>
- $moduleStorageIdentifier : string
- $pageRenderer : PageRenderer
- $resourceDisplayMatcher : Matcher|null
- $resourceFactory : ResourceFactory
- $resourceSelectableMatcher : Matcher|null
- $selectedFolder : Folder|null
- $type : LinkType
- $uriBuilder : UriBuilder
- $view : ViewInterface
- $viewMode : string|null
Methods
- __construct() : mixed
- canHandleLink() : bool
- Checks if this is the handler for the given link
- createView() : ViewInterface
- formatCurrentUrl() : string
- Format the current link for HTML output
- getBodyTagAttributes() : array<string|int, string>
- getLinkAttributes() : array<string|int, mixed>
- getScriptUrl() : string
- Returns the URL of the current script
- getUrlParameters() : array<string|int, string>
- Provides an array or GET parameters for URL generation
- getView() : ViewInterface
- initialize() : mixed
- Initialize the handler
- initializeVariables() : void
- isCurrentlySelectedItem() : bool
- Check if given value is currently the selected item
- 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.
- setView() : self
- createUri() : string
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getViewModeButton() : ButtonInterface
Properties
$currentPage
protected
int
$currentPage
= 1
$displayThumbs
protected
string|null
$displayThumbs
= null
$expandFolder
protected
string|null
$expandFolder
= null
$filelist
protected
FileList|null
$filelist
= null
$iconFactory read-only
protected
IconFactory
$iconFactory
$languageService
protected
LanguageService
$languageService
$languageServiceFactory read-only
protected
LanguageServiceFactory
$languageServiceFactory
$linkBrowser
protected
AbstractLinkBrowserController
$linkBrowser
$linkParts
protected
array<string|int, mixed>
$linkParts
= []
$moduleStorageIdentifier
protected
string
$moduleStorageIdentifier
= 'media_management'
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$resourceDisplayMatcher
protected
Matcher|null
$resourceDisplayMatcher
= null
$resourceFactory read-only
protected
ResourceFactory
$resourceFactory
$resourceSelectableMatcher
protected
Matcher|null
$resourceSelectableMatcher
= null
$selectedFolder
protected
Folder|null
$selectedFolder
= null
$type
protected
LinkType
$type
= \TYPO3\CMS\Filelist\Type\LinkType::FILE
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$view
protected
ViewInterface
$view
$viewMode
protected
string|null
$viewMode
= null
Methods
__construct()
public
__construct(IconFactory $iconFactory, ResourceFactory $resourceFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, LanguageServiceFactory $languageServiceFactory) : mixed
Parameters
- $iconFactory : IconFactory
- $resourceFactory : ResourceFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $languageServiceFactory : LanguageServiceFactory
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
boolcreateView()
public
createView(BackendViewFactory $backendViewFactory, ServerRequestInterface $request) : ViewInterface
Parameters
- $backendViewFactory : BackendViewFactory
- $request : ServerRequestInterface
Return values
ViewInterfaceformatCurrentUrl()
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>getScriptUrl()
Returns the URL of the current script
public
getScriptUrl() : string
Return values
stringgetUrlParameters()
Provides an array or GET parameters for URL generation
public
getUrlParameters(array<string|int, mixed> $parameters) : array<string|int, string>
Parameters
- $parameters : array<string|int, mixed>
Return values
array<string|int, string> —Array of parameters which have to be added to URLs
getView()
public
getView() : ViewInterface
Return values
ViewInterfaceinitialize()
Initialize the handler
public
initialize(AbstractLinkBrowserController $linkBrowser, mixed $identifier, array<string|int, mixed> $configuration) : mixed
Parameters
- $linkBrowser : AbstractLinkBrowserController
- $identifier : mixed
- $configuration : array<string|int, mixed>
-
Page TSconfig of this link handler: TCEMAIN.linkHandler.
.configuration
initializeVariables()
public
initializeVariables(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
isCurrentlySelectedItem()
Check if given value is currently the selected item
public
isCurrentlySelectedItem(array<string|int, mixed> $values) : bool
This method is only used in the page tree.
Parameters
- $values : array<string|int, mixed>
-
Values to be checked
Return values
bool —Returns TRUE if the given values match the currently selected item
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, mixed> $fieldDefinitions) : array<string|int, string>
Parameters
- $fieldDefinitions : array<string|int, mixed>
-
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
Return values
stringsetView()
public
setView(ViewInterface $view) : self
Parameters
- $view : ViewInterface
Return values
selfcreateUri()
protected
createUri(ServerRequestInterface $request[, array<string|int, mixed> $parameters = [] ]) : string
Parameters
- $request : ServerRequestInterface
- $parameters : array<string|int, mixed> = []
Return values
stringgetBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetViewModeButton()
protected
getViewModeButton(ServerRequestInterface $request) : ButtonInterface
Parameters
- $request : ServerRequestInterface