TypoLinkCodecService
Read onlyYes
FinalYes
This class provides basic functionality to encode and decode typolink strings
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Methods
- __construct() : mixed
- decode() : array{url: string, target: string, class: string, title: string, additionalParams: string}
- Decodes a TypoLink string into its parts
- encode() : string
- Encode TypoLink parts to a single string
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
decode()
Decodes a TypoLink string into its parts
public
decode(string $typoLink) : array{url: string, target: string, class: string, title: string, additionalParams: string}
Parameters
- $typoLink : string
-
The properly encoded TypoLink string
Return values
array{url: string, target: string, class: string, title: string, additionalParams: string}encode()
Encode TypoLink parts to a single string
public
encode(array{url?: string, target?: string, class?: string, title?: string, additionalParams?: string} $typoLinkParts) : string
Parameters
- $typoLinkParts : array{url?: string, target?: string, class?: string, title?: string, additionalParams?: string}
Return values
string —A correctly encoded TypoLink string