FileLinkHandler

class \TYPO3\CMS\Core\LinkHandling\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
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'

Methods

asString()

Returns the link to a file as a string

public asString(array $parameters) : string

Parameters

$parameters : array

Return values

string

resolveHandlerData()

Get a file object inside the array data from the string

public resolveHandlerData(array $data) : array

Parameters

$data : array

with the "file" property containing a File object

Tags

throws
FileDoesNotExistException

Return values

array
On this page