Feature: #97536 - Unified API for generating typolinks
See forge#97536
Description
A new
\TYPO3\
class is added to TYPO3
Core, which allows to generate any kind of links in the TYPO3 frontend - links
to files, pages, URLs, email, telephone links, or links to specific records,
such as news entries.
Previously, this functionality resided in
Content
and
Content
but was extracted into a
specific class, only dealing with the generation of links.
This class works with two main methods:
Link
Link
Both methods return a
Link
instance, which can be used
programmatically to render the results of the link generation for HTML output
via
Link
or as JSON with
Link
.
Impact
For TypoScript or Fluid-based renderings, the base functionality for using
Content
is still recommended. However, when
an extension developer wants to work with the raw result, the
Link
and corresponding implementations for JSON and HTML
rendering allow for much more flexibility by accessing more information than
just the raw anchor tag.