LegacyLinkNotationConverter

Class to resolve and convert the "old" link information (email, external url, file, page etc) to a URL or new format for migration

Internal

Table of Contents

Properties

$resourceFactory  : ResourceFactory

Methods

resolve()  : array<string|int, mixed>
Part of the typolink construction functionality, called by typoLink() Used to resolve "legacy"-based typolinks.
getFileOrFolderObjectFromMixedIdentifier()  : array<string|int, mixed>
Internal method that fetches a file or folder object based on the file or folder combined identifier
getResourceFactory()  : ResourceFactory
Initializes the resource factory (only once)
resolvePageRelatedParameters()  : array<string|int, mixed>
Internal method to do some magic to get a page parts, additional params, fragment / section hash

Properties

Methods

resolve()

Part of the typolink construction functionality, called by typoLink() Used to resolve "legacy"-based typolinks.

public resolve(string $linkParameter) : array<string|int, mixed>

Tries to get the type of the link from the link parameter could be

  • "mailto" an email address
  • "url" external URL
  • "file" a local file (checked AFTER getPublicUrl() is called)
  • "page" a page (integer)

Does NOT check if the page exists or the file exists.

Parameters
$linkParameter : string

could be "fileadmin/myfile.jpg", "info@typo3.org", "13" or "http://www.typo3.org"

Return values
array<string|int, mixed>

getFileOrFolderObjectFromMixedIdentifier()

Internal method that fetches a file or folder object based on the file or folder combined identifier

protected getFileOrFolderObjectFromMixedIdentifier(string $mixedIdentifier) : array<string|int, mixed>
Parameters
$mixedIdentifier : string

can be something like "2" (file uid), "fileadmin/i/like.png" or "2:/myidentifier/"

Return values
array<string|int, mixed>

the result with the type (file or folder) set

resolvePageRelatedParameters()

Internal method to do some magic to get a page parts, additional params, fragment / section hash

protected resolvePageRelatedParameters(string $data) : array<string|int, mixed>
Parameters
$data : string

the input variable, can be "mypage,23" with fragments, keys

Return values
array<string|int, mixed>

the result array with the page type set


        
On this page

Search results