Skip to content

Commit

Permalink
[TASK] Add deprecation notes for ViewHelpers
Browse files Browse the repository at this point in the history
From TYPO3 version 12.4 onwards deprecations will be displayed automatically

resolves #38
  • Loading branch information
linawolf committed Jul 1, 2024
1 parent 74dae95 commit af2cf5f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
14 changes: 14 additions & 0 deletions Documentation/typo3/fluid/latest/Base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,26 @@
Base ViewHelper `<f:base>`
==========================

.. deprecated:: TYPO3 v11.5

The :html:`<f:base>` ViewHelper is not suitable in almost all use cases
and has been deprecated: In most cases the :php:`PageRenderer` takes care of the
main :html:`<head>` markup, directly, or indirectly via TypoScript :html:`config.baseURL`.


ViewHelper which creates a :html:`<base href="..."></base>` tag.

The Base URI is taken from the current request.

.. _typo3-fluid-base-migration:

Migration
=========

If the ViewHelper is still needed, copy
:php:`TYPO3\CMS\Fluid\ViewHelpers\BaseViewHelper` to the consuming extension,
giving the ViewHelper a happy life in an extension specific namespace.

Examples
========

Expand Down
8 changes: 3 additions & 5 deletions Documentation/typo3/fluid/latest/Be/Buttons/Shortcut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
Be.buttons.shortcut ViewHelper `<f:be.buttons.shortcut>`
========================================================


.. deprecated:: TYPO3 v11.5
Will be removed in TYPO3 v12. It was only introduced as "experimental".

ViewHelper which returns shortcut button with icon.

.. note::
This ViewHelper is experimental!

Examples
========

Expand All @@ -36,7 +34,7 @@ Explicitly set parameters to be stored in the shortcut::
Shortcut button as known from the TYPO3 backend.
This time only the specified GET parameters and SET[]-settings will be stored.

.. note:
.. note::

Normally you won't need to set getVars & setVars parameters in Extbase modules.

Expand Down
21 changes: 21 additions & 0 deletions Documentation/typo3/fluid/latest/Be/Container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,31 @@
Be.container ViewHelper `<f:be.container>`
==========================================

.. deprecated:: 11.5

This backend module related ViewHelper mostly provides the same functionality
as :ref:`typo3-fluid-be-pagerenderer`,
with the additional opportunity to render an empty doc header.

ViewHelper which allows you to create extbase based modules in the style of TYPO3 default modules.

.. _typo3-fluid-be-containermigration:

Migration
=========

When this ViewHelper is used to register additional backend module
resources like CSS or JavaScript, :ref:`typo3-fluid-be-pagerenderer` can be
used as drop-in replacement.

If the ViewHelper is used to additionally render an empty ModuleTemplate,
this part should be moved to a controller instead. Simple example:

.. code-block:: php
$moduleTemplate->setContent($view->render());
return new HtmlResponse($moduleTemplate->renderContent());
Examples
========

Expand Down
25 changes: 25 additions & 0 deletions Documentation/typo3/fluid/latest/Uri/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,38 @@
Uri.email ViewHelper `<f:uri.email>`
====================================

.. deprecated:: TYPO3 v11.5

In favor of allowing more content security policy scenarios, :js:`URI`
is not used anymore per default. As a result, :html:`<f:uri.email>`
ViewHelper became obsolete. The ViewHelper will be removed with TYPO3 v12.0.

See :ref:`typo3-fluid-uri-email-migration` for details.


Email URI ViewHelper.
Generates an email URI incorporating TYPO3s `spamProtectEmailAddresses`_ TypoScript setting.

.. _spamProtectEmailAddresses: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Setup/Config/Index.html#spamprotectemailaddresses

.. _typo3-fluid-uri-email-migration:

Migration
=========

In case :typoscript:`config.spamProtectEmailAddresses` is used, make use of
:html:`<f.link.email email="{email}">` ViewHelper which returns the
complete :html:`<a>` tag like this:

.. code-block:: html

<a href="#" data-mailto-token="ocknvq,hqqBdct0vnf"
data-mailto-vector="1">user(at)my.example(dot)com</a>

In case spam-protected is not used or not useful (for example in backend user
interface), view-helper invocation can be omitted completely.


Example
=======

Expand Down

0 comments on commit af2cf5f

Please sign in to comment.