Skip to content

Commit

Permalink
Add additional headers to FlashMessage page (#1944)
Browse files Browse the repository at this point in the history
* Add additional headers to FlashMessage page

Previously, a large content block was under "Message severities"
which was primarily not related to the severities. Now, additional
headers have been added for the sections.

* Fix typos

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>

* Fix typos

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>

* Use FlashMessage

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>

* Use FlashMessage

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>

* Use FlashMessage

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>

* Fix header underlines

* Fix conflict resolution

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
  • Loading branch information
sypets and linawolf authored Jul 12, 2022
1 parent 275c787 commit 0074b9c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Documentation/ApiOverview/FlashMessages/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ The different severity levels are described below:
Flash messages API
==================

Instantiate a flash message
---------------------------

Creating a flash message is achieved by simply instantiating an object
of class :php:`\TYPO3\CMS\Core\Messaging\FlashMessage`

Expand Down Expand Up @@ -84,6 +87,14 @@ The severity is defined by using class constants provided by

* :php:`FlashMessage::ERROR` for errors

The fourth parameter passed to the constructor is a flag that
indicates whether the message should be stored in the session or not (the
default is not). Storage in the session should be used if you need the
message to be still present after a redirection.

Add a flash message to the queue
--------------------------------

In backend modules you can then make that message appear on top of the
module after a page refresh or the rendering of the next page request
or render it on your own where ever you want.
Expand Down Expand Up @@ -138,11 +149,10 @@ as top-right notifications, instead of inline:
);
$notificationQueue->enqueue($flashMessage);
The recommend way to show flash messages is to use the Fluid Viewhelper :html:`<f:flashMessages />`.
This Viewhelper works in any context because it use the :php:`FlashMessageRendererResolver` class
The recommended way to show flash messages is to use the Fluid ViewHelper :html:`<f:flashMessages />`.
This ViewHelper works in any context because it use the :php:`FlashMessageRendererResolver` class
to find the correct renderer for the current context.


.. _flash-messages-renderer:

Flash messages renderer
Expand Down

0 comments on commit 0074b9c

Please sign in to comment.