Feature: #94741 - Register SoftReference parsers via DI
See forge#94741
Description
Parsers for soft references can now be
registered via dependency injection in the corresponding
Configuration/
file of your extension. This is done
by tagging your class with the new tag name softreference.
and
providing the parser key for the attribute parser
.
Example:
VENDOR\Extension\SoftReference\YourSoftReferenceParser:
tags:
- name: softreference.parser
parserKey: your_key
In addition, parsers now have to implement
\TYPO3\
.
This interface describes the parse
method, which is very similar to the
old method find
. The difference is that $parser
(former
known as $sp
) and $parameters
(former known as
$sp
) can now be optionally set with the set
method.
The key can be retrieved with the get
method.
The return type has also been changed to
\TYPO3\
.
This model holds the former result array key entries content
and
elements
as properties and has appropriate getter methods for them. It
should be created by its own factory method
Soft
, which expects both above-mentioned
arguments to be provided. If the result is empty,
Soft
should be used instead.
Impact
Developers can register their user-defined soft reference parsers in their
Configuration/
file. In addition, parser have to
implement the new interface
\TYPO3\
.