‪TYPO3CMS  ‪main
TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter Class Reference

Public Member Functions

 resolve (string $linkParameter)
 

Protected Member Functions

array resolvePageRelatedParameters (string $data)
 
array getFileOrFolderObjectFromMixedIdentifier (string $mixedIdentifier)
 
 getResourceFactory ()
 

Protected Attributes

ResourceFactory $resourceFactory
 

Detailed Description

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

Definition at line 35 of file LegacyLinkNotationConverter.php.

Member Function Documentation

◆ getFileOrFolderObjectFromMixedIdentifier()

array TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::getFileOrFolderObjectFromMixedIdentifier ( string  $mixedIdentifier)
protected

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

Parameters
string$mixedIdentifier‪can be something like "2" (file uid), "fileadmin/i/like.png" or "2:/myidentifier/"
Returns
‪array the result with the type (file or folder) set

Definition at line 211 of file LegacyLinkNotationConverter.php.

References TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\getResourceFactory(), TYPO3\CMS\Core\Resource\ResourceInterface\getStorage(), TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_FILE, TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_FOLDER, TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_UNKNOWN, and TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_URL.

Referenced by TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\resolve().

◆ getResourceFactory()

TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::getResourceFactory ( )
protected

◆ resolve()

TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::resolve ( string  $linkParameter)

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

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
string$linkParameter‪could be "fileadmin/myfile.jpg", "info@typo3.org", "13" or "http://www.typo3.org"

Definition at line 56 of file LegacyLinkNotationConverter.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\LinkHandling\UrlLinkHandler\getDefaultScheme(), TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\getFileOrFolderObjectFromMixedIdentifier(), TYPO3\CMS\Core\Core\Environment\getPublicPath(), TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\resolvePageRelatedParameters(), TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_EMAIL, TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_RECORD, TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_TELEPHONE, TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_UNKNOWN, and TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_URL.

◆ resolvePageRelatedParameters()

array TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::resolvePageRelatedParameters ( string  $data)
protected

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

Parameters
string$data‪the input variable, can be "mypage,23" with fragments, keys
Returns
‪array the result array with the page type set

Definition at line 167 of file LegacyLinkNotationConverter.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_PAGE.

Referenced by TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter\resolve().

Member Data Documentation

◆ $resourceFactory

ResourceFactory TYPO3\CMS\Core\LinkHandling\LegacyLinkNotationConverter::$resourceFactory
protected