Skip to content

Commit c7708e0

Browse files
authored
FluidEmail request handling in CLI commands
Clarify usage of ViewHelpers with request objects and console commands. Releases: main, 13.4
1 parent cf89525 commit c7708e0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Documentation/ApiOverview/Mail/Index.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ Set the current request object for `FluidEmail`
412412
In order to use ViewHelpers that need a valid current request, such as :ref:`t3viewhelper:typo3-fluid-uri-page`,
413413
pass the current request to the FluidEmail instance:
414414

415-
416415
.. code-block:: php
417416
418417
use TYPO3\CMS\Core\Mail\FluidEmail;
@@ -421,8 +420,12 @@ pass the current request to the FluidEmail instance:
421420
$email->setRequest($this->request);
422421
423422
Read more aboout :ref:`Getting the PSR-7 request object <getting-typo3-request-object>` in different
424-
contexts. In a context where no valid request object can be retrieved, such as in a
425-
:ref:`Console command <t3coreapi:symfony-console-commands>` the affected ViewHelpers cannot be used.
423+
contexts.
424+
425+
In a context where no valid request object can be retrieved, such as in a
426+
:ref:`Console command <t3coreapi:symfony-console-commands>` a valid frontend context need to be
427+
simmulated (`Simulating a frontend request in TYPO3 Commands <https://docs.typo3.org/permalink/t3coreapi:console-command-tutorial-fe-request-example>`_)
428+
or the affected ViewHelpers cannot be used.
426429

427430
Trying to use these ViewHelpers without a valid request throws an :doc:`error <t3exceptions:Exceptions/1639819269>`
428431
like the following:

0 commit comments

Comments
 (0)