To read more about this cool feature
Contact: email@example.org
The parsers will return an instance of :php:`\TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult` containing information about the references contained in the string. This object has two properties: :php:`$content` and :php:`$elements`. Property :php:`$content` ------------------------ .. code-block:: htmlTo read more about this cool feature
Contact: {softref:123456}
This property contains the input content. Links to be substituted have been replaced by soft reference tokens. For example: :html:`Contact: {softref:123456}
` Tokens are strings like `{softref:123456}` which are placeholders for values extracted by a soft reference parser. For each token there is an entry in :php:`$elements` which has a :php:`subst` key defining the :php:`tokenID` and the :php:`tokenValue`. See below. Property :php:`$elements` ------------------------- .. code-block:: php [ [ 'matchString' => '', 'error' => 'There is a glitch in the universe, page 42 not found.', 'subst' => [ 'type' => 'db', 'tokenID' => '424242', 'tokenValue' => 't3://page?uid=96', 'recordRef' => 'pages:96', ] ], [ 'matchString' => '', 'subst' => [ 'type' => 'string', 'tokenID' => '78910', 'tokenValue' => 'https://example.org/some-cool-feature', ] ], [ 'matchString' => 'email@example.org', 'subst' => [ 'type' => 'string', 'tokenID' => '123456', 'tokenValue' => 'test@example.com', ] ] ] This property is an array of arrays, each with these keys: * :php:`matchString`: The value of the match. This is only for informational purposes to show, what was found. * :php:`error`: An error message can be set here, like "file not found" etc. * :php:`subst`: exists on a successful match and defines the token from :php:`content` * :php:`tokenID`: The tokenID string corresponding to the token in output content, `{softref:[tokenID]}`. This is typically a md5 hash of a string uniquely defining the position of the element. * :php:`tokenValue`: The value that the token substitutes in the text. If this value is inserted instead of the token, the content should match what was inputted originally. * :php:`type`: the type of substitution. :php:`file` is a relative file reference, :php:`db` is a database record reference, :php:`string` is a manually modified string content (email, external url, phone number) * :php:`relFileName`: (for :php:`file` type): Relative filename. * :php:`recordRef`: (for :php:`db` type): Reference to DB record on the form `