TYPO3  7.6
Public Member Functions | Static Protected Attributes | List of all members
TypoLinkCodecService Class Reference

Public Member Functions

 encode (array $typoLinkParts)
 
 decode ($typoLink)
 

Static Protected Attributes

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

Detailed Description

This class provides basic functionality to encode and decode typolink strings

Definition at line 20 of file TypoLinkCodecService.php.

Member Function Documentation

decode (   $typoLink)

Decodes a TypoLink string into its parts

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

Definition at line 77 of file TypoLinkCodecService.php.

Referenced by TypoLinkCodecService\encode().

encode ( array  $typoLinkParts)

Encode TypoLink parts to a single string

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

Definition at line 42 of file TypoLinkCodecService.php.

References TypoLinkCodecService\decode().

Member Data Documentation

$emptyValueSymbol = '-'
staticprotected

Definition at line 34 of file TypoLinkCodecService.php.

$partDelimiter = ' '
staticprotected

Definition at line 27 of file TypoLinkCodecService.php.