‪TYPO3CMS  10.4
TYPO3\CMS\Frontend\Service\TypoLinkCodecService Class Reference

Public Member Functions

string encode (array $typoLinkParts)
 
array decode ($typoLink)
 

Static Protected Attributes

static string $partDelimiter = ' '
 
static string $emptyValueSymbol = '-'
 

Detailed Description

This class provides basic functionality to encode and decode typolink strings

Definition at line 21 of file TypoLinkCodecService.php.

Member Function Documentation

◆ decode()

array TYPO3\CMS\Frontend\Service\TypoLinkCodecService::decode (   $typoLink)

Decodes a TypoLink string into its parts

Parameters
string$typoLink‪The properly encoded TypoLink string
Returns
‪array Associative array of TypoLink parts with the keys url, target, class, title, additionalParams

Definition at line 76 of file TypoLinkCodecService.php.

Referenced by TYPO3\CMS\Frontend\Service\TypoLinkCodecService\encode().

◆ encode()

string TYPO3\CMS\Frontend\Service\TypoLinkCodecService::encode ( array  $typoLinkParts)

Encode TypoLink parts to a single string

Parameters
array$typoLinkParts‪Array with keys url and optionally any of target, class, title, additionalParams
Returns
‪string Returns a correctly encoded TypoLink string

Definition at line 41 of file TypoLinkCodecService.php.

References TYPO3\CMS\Frontend\Service\TypoLinkCodecService\decode().

Member Data Documentation

◆ $emptyValueSymbol

string TYPO3\CMS\Frontend\Service\TypoLinkCodecService::$emptyValueSymbol = '-'
staticprotected

Symbol for TypoLink parts not specified

Definition at line 33 of file TypoLinkCodecService.php.

◆ $partDelimiter

string TYPO3\CMS\Frontend\Service\TypoLinkCodecService::$partDelimiter = ' '
staticprotected

Delimiter for TypoLink string parts

Definition at line 27 of file TypoLinkCodecService.php.