FileLinkHandler implements LinkHandlingInterface
Interface for classes which are transforming a tag link hrefs for folders, in order to use FAL to store them in database, which means that files can be moved in the fileadmin without breaking file links in the frontend/backend
Table of Contents
Interfaces
- LinkHandlingInterface
- Interface for classes which are transforming a tag link hrefs to records or resources basically any URLs that should not be saved directly in the database on as is basis since they might be moved, changed by admin working in backend
Properties
- $baseUrn : string
- The Base URN
- $resourceFactory : ResourceFactory
- The resource factory object to resolve file objects
Methods
- asString() : string
- Returns the link to a file as a string
- resolveHandlerData() : array<string|int, mixed>
- Get a file object inside the array data from the string
- getResourceFactory() : ResourceFactory
- Initializes the resource factory (only once)
- resolveFile() : FileInterface|null
Properties
$baseUrn
The Base URN
protected
string
$baseUrn
= 't3://file'
$resourceFactory
The resource factory object to resolve file objects
protected
ResourceFactory
$resourceFactory
Methods
asString()
Returns the link to a file as a string
public
asString(array<string|int, mixed> $parameters) : string
Parameters
- $parameters : array<string|int, mixed>
Return values
stringresolveHandlerData()
Get a file object inside the array data from the string
public
resolveHandlerData(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
with the "file" property containing a File object
Tags
Return values
array<string|int, mixed>getResourceFactory()
Initializes the resource factory (only once)
protected
getResourceFactory() : ResourceFactory
Return values
ResourceFactoryresolveFile()
protected
resolveFile(array<string|int, mixed> $data) : FileInterface|null
Parameters
- $data : array<string|int, mixed>