LegacyLinkNotationConverter

class \TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter

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

Table of Contents

Properties

$resourceFactory  : ResourceFactory|null

Methods

resolve()  : array
Part of the typolink construction functionality, called by typoLink() Used to resolve "legacy"-based typolinks.
getFileOrFolderObjectFromMixedIdentifier()  : array
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)
isExistingPathInPublicPath()  : bool
Checks whether the given relative path points to an existing file or folder below the public web path
resolvePageRelatedParameters()  : array
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

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

getFileOrFolderObjectFromMixedIdentifier()

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

protected getFileOrFolderObjectFromMixedIdentifier(string $mixedIdentifier) : array

Parameters

$mixedIdentifier : string

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

Return values

array —

the result with the type (file or folder) set

isExistingPathInPublicPath()

Checks whether the given relative path points to an existing file or folder below the public web path

protected isExistingPathInPublicPath(string $path) : bool

Parameters

$path : string

Return values

bool

resolvePageRelatedParameters()

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

protected resolvePageRelatedParameters(string $data) : array

Parameters

$data : string

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

Return values

array —

the result array with the page type set

On this page