From 1d13d8109d624599d157fc409ec0bd72752bb6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:50:01 +0200 Subject: [PATCH 01/12] Adds page for installation description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/installation.md | 5 +++++ mkdocs.yml | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 docs/book/installation.md diff --git a/docs/book/installation.md b/docs/book/installation.md new file mode 100644 index 0000000..be1198c --- /dev/null +++ b/docs/book/installation.md @@ -0,0 +1,5 @@ +# This Is Only a Placeholder + +The content of this page can be found under: + +https://github.com/laminas/documentation-theme/blob/master/theme/pages/installation.html diff --git a/mkdocs.yml b/mkdocs.yml index 02d66a2..d6617cd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,6 +2,7 @@ docs_dir: docs/book site_dir: docs/html nav: - Home: index.md + - Installation: installation.md - "Controller Plugin": controller-plugin.md - "View Helper": view-helper.md site_name: laminas-mvc-plugin-flashmessenger @@ -10,3 +11,5 @@ repo_url: 'https://github.com/laminas/laminas-mvc-plugin-flashmessenger' extra: project: MVC show_special_homepage: true + installation: + module_class: 'Laminas\Mvc\Plugin\FlashMessenger\Module' From b5a29b2bd94140548293f62e26c885bdbed190f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:50:23 +0200 Subject: [PATCH 02/12] Adds introduction page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/introduction.md | 25 +++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 26 insertions(+) create mode 100644 docs/book/introduction.md diff --git a/docs/book/introduction.md b/docs/book/introduction.md new file mode 100644 index 0000000..6e920ab --- /dev/null +++ b/docs/book/introduction.md @@ -0,0 +1,25 @@ +# Introduction + +Giving feedback to a user is an important part of a good application. +Flash messages are used to notify the user about a successful form submit, failure on saving in the database, wrong authentification credentials or something similar. +At the end of a request, a message is created and shown to the user at the next request. +The flash messages are self-expiring and session-based. + +To create and expose flash messages in a laminas-mvc-based application this packages provides: + +- [a controller plugin to create and retrieve messages](controller-plugin.md) +- [a view helper to render the messages](view-helper.md) + +A message is set in a controller and then rendered in a view script. + +## Namespaces + +The controller plugin and the view helper supports different types of messages: + +- default +- success +- warning +- error +- info + +These namespaces allow to handle different output formats. diff --git a/mkdocs.yml b/mkdocs.yml index d6617cd..7104ad0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,6 +2,7 @@ docs_dir: docs/book site_dir: docs/html nav: - Home: index.md + - Introduction: introduction.md - Installation: installation.md - "Controller Plugin": controller-plugin.md - "View Helper": view-helper.md From 625b23d3a838a6431df044ce9f8a8e490ba0e337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:50:47 +0200 Subject: [PATCH 03/12] Adds page for basic usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/basic-usage.md | 43 ++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 44 insertions(+) create mode 100644 docs/book/basic-usage.md diff --git a/docs/book/basic-usage.md b/docs/book/basic-usage.md new file mode 100644 index 0000000..99c5fe1 --- /dev/null +++ b/docs/book/basic-usage.md @@ -0,0 +1,43 @@ +# Basic Usage + +In the following example, a flash message is set in an edit action and the rendering is done after a redirect. + +## Create a Flash Message + +Set a message to the messenger in a controller action, e.g. `module/Album/Controller/AlbumController.php`: + +```php +namespace Album\Controller; + +use Laminas\Mvc\Controller\AbstractActionController; + +class AlbumController extends AbstractActionController +{ + public function editAction() + { + // Do some work… + + // Add success message + $this->flashMessenger()->addSuccessMessage( + 'Album created successfully.' + ); + + // Redirect + return $this->redirect()->toRoute('album'); + } +} +``` + +## Render a Flash Message + +Render all messages in a view script, e.g. `module/Album/view/album/album/index.phtml`: + +```php +flashMessenger()->render() ?> +``` + +Output: + +```html +
  • Album created successfully.
+``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 7104ad0..9ca1c51 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,6 +4,7 @@ nav: - Home: index.md - Introduction: introduction.md - Installation: installation.md + - "Basic Usage": basic-usage.md - "Controller Plugin": controller-plugin.md - "View Helper": view-helper.md site_name: laminas-mvc-plugin-flashmessenger From 53b54ceffdbbca4d14b467627acb8f28ca39ec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:51:20 +0200 Subject: [PATCH 04/12] Updates code example for controller plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/controller-plugin.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/book/controller-plugin.md b/docs/book/controller-plugin.md index c40341e..3ad2814 100644 --- a/docs/book/controller-plugin.md +++ b/docs/book/controller-plugin.md @@ -85,18 +85,21 @@ current namespace within the session container. ```php public function processAction() { - // ... do some work ... + // Do some work… + $this->flashMessenger()->addMessage('You are now logged in.'); + return $this->redirect()->toRoute('user-success'); } public function successAction() { $return = ['success' => true]; - $flashMessenger = $this->flashMessenger(); - if ($flashMessenger->hasMessages()) { - $return['messages'] = $flashMessenger->getMessages(); + + if ($this->flashMessenger()->hasMessages()) { + $return['messages'] = $this->flashMessenger()->getMessages(); } + return $return; } ``` From a1ef4050936cbe2ac0091f4f89ba0c70e7d2eef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:53:19 +0200 Subject: [PATCH 05/12] Updates view helper to use a callout for IDE auto-completion section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/view-helper.md | 41 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/docs/book/view-helper.md b/docs/book/view-helper.md index d1cf4c0..7c0905a 100644 --- a/docs/book/view-helper.md +++ b/docs/book/view-helper.md @@ -145,26 +145,21 @@ data-dismiss="alert" aria-hidden="true">×
  • ', ], ``` -## IDE auto-completion in templates - -The `Laminas\Mvc\Plugin\FlashMessenger\View\HelperTrait` trait can be used to -provide auto-completion for modern IDEs. It defines the aliases of the view -helpers in a DocBlock as `@method` tags. - -### Usage - -In order to allow auto-completion in templates, `$this` variable should be -type-hinted via a DocBlock at the top of your template. It is recommended that -you always add the `Laminas\View\Renderer\PhpRenderer` as the first type, so that -the IDE can auto-suggest the default view helpers from `laminas-view`. Next, chain -the `HelperTrait` from `laminas-i18n` with a pipe symbol (a.k.a. vertical bar) `|`: - -```php -/** - * @var Laminas\View\Renderer\PhpRenderer|Laminas\Mvc\Plugin\FlashMessenger\View\HelperTrait $this - */ -``` - -You may chain as many `HelperTrait` traits as you like, depending on view -helpers from which Laminas component you are using and would like to -provide auto-completion for. + +> TIP: **IDE Auto-Completion in Templates** +> The `Laminas\Mvc\Plugin\FlashMessenger\View\HelperTrait` trait can be used to provide auto-completion for modern IDEs. It defines the aliases of the view helpers in a DocBlock as `@method` tags. +> +> ### Usage +> +> In order to allow auto-completion in templates, `$this` variable should be type-hinted via a DocBlock at the top of a template. +> It is recommended that always the `Laminas\View\Renderer\PhpRenderer` is added as the first type, so that the IDE can auto-suggest the default view helpers from `laminas-view`. +> The `HelperTrait` from `laminas-mvc-plugin-flashmessenger` can be chained with a pipe symbol (a.k.a. vertical bar) `|`: +> +> ```php +> /** +> * @var Laminas\View\Renderer\PhpRenderer|Laminas\Mvc\Plugin\FlashMessenger\View\HelperTrait $this +> */ +> ``` +> +> The `HelperTrait` traits can be chained as many as needed, depending on which view helpers from the different Laminas component are used and where the auto-completion is to be made. + From a0684b77835c7f083a5897cbcb14bce8760da73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:54:02 +0200 Subject: [PATCH 06/12] Removes outdated line numbers from code example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/view-helper.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/book/view-helper.md b/docs/book/view-helper.md index 7c0905a..01615d0 100644 --- a/docs/book/view-helper.md +++ b/docs/book/view-helper.md @@ -58,7 +58,6 @@ distinct visuals for your flash messages. The default output format is defined within the source code of the `FlashMessenger` view helper itself. ```php -// Laminas/View/Helper/FlashMessenger.php#L41-L43 protected $messageCloseString = '
'; protected $messageOpenFormat = '
  • '; protected $messageSeparatorString = '
  • '; From 0675fd6efade8994f6ae66c7be358d9db206fbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:55:19 +0200 Subject: [PATCH 07/12] Updates the introduction for the view helper to clarify which helper is meant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/view-helper.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/book/view-helper.md b/docs/book/view-helper.md index 01615d0..f70c5d4 100644 --- a/docs/book/view-helper.md +++ b/docs/book/view-helper.md @@ -1,7 +1,6 @@ # FlashMessenger View Helper -The `FlashMessenger` helper is used to render the messages of the -[FlashMessenger controller plugin](controller-plugin.md). +The `FlashMessenger` view helper is used to render the messages of the [FlashMessenger controller plugin](controller-plugin.md). ## Basic Usage From ec98c48568a0ccd4f235b1cac15f0c3a4adf4515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 07:56:44 +0200 Subject: [PATCH 08/12] Adds cookbook recipes for Bootstrap and global configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/cookbook/application-wide-layout.md | 85 +++++++++++++++++++ docs/book/cookbook/bootstrap.md | 46 ++++++++++ docs/book/view-helper.md | 57 ------------- mkdocs.yml | 3 + 4 files changed, 134 insertions(+), 57 deletions(-) create mode 100644 docs/book/cookbook/application-wide-layout.md create mode 100644 docs/book/cookbook/bootstrap.md diff --git a/docs/book/cookbook/application-wide-layout.md b/docs/book/cookbook/application-wide-layout.md new file mode 100644 index 0000000..0812c16 --- /dev/null +++ b/docs/book/cookbook/application-wide-layout.md @@ -0,0 +1,85 @@ +# Set Application-Wide Layout + +The format for the view helper `FlashMessenger` can be configured for an entire application and all uses of the helper. + +`Laminas\View\Helper\Service\FlashMessengerFactory` checks the application +configuration and creates the view helper with the given format options. + +## Set Format for All Namespaces + +Add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: + +```php +return [ + 'view_helper_config' => [ + 'flashmessenger' => [ + 'message_open_format' => '', + 'message_close_string' => '

    ', + 'message_separator_string' => '
    ', + ], + ], +]; +``` + +## Set Formats Individually for Namespaces + +INFO: **New Feature** +Available since version 1.8.0 + +Add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: + +```php +return [ + 'view_helper_config' => [ + 'flashmessenger' => [ + 'default' => [ + 'message_open_format' => '', + 'message_close_string' => '

    ', + 'message_separator_string' => '
    ', + 'classes' => 'custom-default example-class', + ], + 'success' => [ + 'message_open_format' => '', + 'message_close_string' => '

    ', + 'message_separator_string' => '
    ', + 'classes' => 'custom-success example-class', + ], + 'warning' => [ + // … + ], + 'error' => [ + // … + ], + 'info' => [ + // … + ], + ], + ], +]; +``` + +If the default unordered list should be retained, then set only the classes: + +```php +return [ + 'view_helper_config' => [ + 'flashmessenger' => [ + 'default' => [ + 'classes' => 'custom-default', + ], + 'success' => [ + 'classes' => 'custom-success', + ], + 'warning' => [ + 'classes' => 'custom-warning', + ], + 'error' => [ + 'classes' => 'custom-error', + ], + 'info' => [ + 'classes' => 'custom-info', + ], + ], + ], +]; +``` \ No newline at end of file diff --git a/docs/book/cookbook/bootstrap.md b/docs/book/cookbook/bootstrap.md new file mode 100644 index 0000000..e663a8d --- /dev/null +++ b/docs/book/cookbook/bootstrap.md @@ -0,0 +1,46 @@ +# Use Alerts from Bootstrap + +To use the syntax of the [alerts from the Bootstrap CSS framework](https://getbootstrap.com/docs/5.2/components/alerts/) for the output of the view helper, the configuration of the message format must be adjusted. + +Add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: + +```php +return [ + 'view_helper_config' => [ + 'flashmessenger' => [ + 'default' => [ + 'message_open_format' => '', + 'message_close_string' => '', + 'message_separator_string' => '', + 'classes' => 'alert alert-primary', + ], + 'success' => [ + 'message_open_format' => '', + 'message_close_string' => '', + 'message_separator_string' => '', + 'classes' => 'alert alert-success', + ], + 'warning' => [ + 'message_open_format' => '', + 'message_close_string' => '', + 'message_separator_string' => '', + 'classes' => 'alert alert-success', + ], + 'error' => [ + 'message_open_format' => '', + 'message_close_string' => '', + 'message_separator_string' => '', + 'classes' => 'alert alert-danger', + ], + 'info' => [ + 'message_open_format' => '', + 'message_close_string' => '', + 'message_separator_string' => '', + 'classes' => 'alert alert-info', + ], + ], + ], +]; +``` + +This will set the format [for all uses of the view helper](application-wide-layout.md). diff --git a/docs/book/view-helper.md b/docs/book/view-helper.md index f70c5d4..e04b01d 100644 --- a/docs/book/view-helper.md +++ b/docs/book/view-helper.md @@ -86,63 +86,6 @@ The above code sample then would then generate the following output: ``` -## Sample Modification for Twitter Bootstrap 3 - -Taking all the above knowledge into account, we can create a nice, highly usable -and user-friendly rendering strategy using the -[Bootstrap front-end framework](http://getbootstrap.com/) version 3 layouts: - -```php -// In any of your .phtml files: -$flash = $this->flashMessenger(); -$flash->setMessageOpenFormat(' - -
    • ') - ->setMessageSeparatorString('
    • ') - ->setMessageCloseString('
    '); - -echo $flash->render('error', ['alert', 'alert-dismissible', 'alert-danger']); -echo $flash->render('info', ['alert', 'alert-dismissible', 'alert-info']); -echo $flash->render('default', ['alert', 'alert-dismissible', 'alert-warning']); -echo $flash->render('success', ['alert', 'alert-dismissible', 'alert-success']); -``` - -The output of the above example would create dismissable `FlashMessages` with -the following HTML markup. The example only covers one type of `FlashMessenger` -output; if you would have several `FlashMessages` available in each of the -rendered `namespaces`, then you would receive the same output multiple times -only having different CSS classes applied. - -```html -
    - -
      -
    • Some FlashMessenger Content
    • -
    • You, who's reading the docs, are AWESOME!
    • -
    -
    -``` - -## Alternative Configuration of the ViewHelper Layout - -`Laminas\View\Helper\Service\FlashMessengerFactory` checks the application -configuration, making it possible to set up the `FlashMessenger` strings through -your `module.config.php`, too. The next example will set up the output to be -identical with the above Twitter Bootstrap 3 Example - -```php -'view_helper_config' => [ - 'flashmessenger' => [ - 'message_open_format' => '
    • ', - 'message_close_string' => '
    ', - 'message_separator_string' => '
  • ', - ], -], -``` - > TIP: **IDE Auto-Completion in Templates** > The `Laminas\Mvc\Plugin\FlashMessenger\View\HelperTrait` trait can be used to provide auto-completion for modern IDEs. It defines the aliases of the view helpers in a DocBlock as `@method` tags. diff --git a/mkdocs.yml b/mkdocs.yml index 9ca1c51..90e2337 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -7,6 +7,9 @@ nav: - "Basic Usage": basic-usage.md - "Controller Plugin": controller-plugin.md - "View Helper": view-helper.md + - Cookbook: + - "Set Application-Wide Layout": cookbook/application-wide-layout.md + - "Use Alerts from Bootstrap": cookbook/bootstrap.md site_name: laminas-mvc-plugin-flashmessenger site_description: 'Plugin for creating and exposing flash messages via laminas-mvc controllers' repo_url: 'https://github.com/laminas/laminas-mvc-plugin-flashmessenger' From 160e2197f78763801c582c4933270d5a1b2aa0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Wed, 29 Jun 2022 08:08:13 +0200 Subject: [PATCH 09/12] Adds missing new line in cookbook recipe for application-wide layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/cookbook/application-wide-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/cookbook/application-wide-layout.md b/docs/book/cookbook/application-wide-layout.md index 0812c16..71cb8af 100644 --- a/docs/book/cookbook/application-wide-layout.md +++ b/docs/book/cookbook/application-wide-layout.md @@ -82,4 +82,4 @@ return [ ], ], ]; -``` \ No newline at end of file +``` From 793241199c3d103d825227fbee1ab801bbb31535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Mon, 1 Aug 2022 21:27:58 +0200 Subject: [PATCH 10/12] Updates wording in all pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/basic-usage.md | 4 ++-- docs/book/cookbook/application-wide-layout.md | 4 ++-- docs/book/cookbook/bootstrap.md | 2 +- docs/book/introduction.md | 24 +++++++++---------- docs/book/view-helper.md | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/book/basic-usage.md b/docs/book/basic-usage.md index 99c5fe1..6c61331 100644 --- a/docs/book/basic-usage.md +++ b/docs/book/basic-usage.md @@ -1,10 +1,10 @@ # Basic Usage -In the following example, a flash message is set in an edit action and the rendering is done after a redirect. +In the following example, a flash message is set in a controller action and the rendering is done after a redirect. ## Create a Flash Message -Set a message to the messenger in a controller action, e.g. `module/Album/Controller/AlbumController.php`: +Store a message in the messenger of a controller action, e.g. `module/Album/Controller/AlbumController.php`: ```php namespace Album\Controller; diff --git a/docs/book/cookbook/application-wide-layout.md b/docs/book/cookbook/application-wide-layout.md index 71cb8af..931559a 100644 --- a/docs/book/cookbook/application-wide-layout.md +++ b/docs/book/cookbook/application-wide-layout.md @@ -1,11 +1,11 @@ # Set Application-Wide Layout -The format for the view helper `FlashMessenger` can be configured for an entire application and all uses of the helper. +The format for the `FlashMessenger` view helper can be configured for an entire application as well as all uses of the helper. `Laminas\View\Helper\Service\FlashMessengerFactory` checks the application configuration and creates the view helper with the given format options. -## Set Format for All Namespaces +## Set the Format for All Namespaces Add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: diff --git a/docs/book/cookbook/bootstrap.md b/docs/book/cookbook/bootstrap.md index e663a8d..78f9439 100644 --- a/docs/book/cookbook/bootstrap.md +++ b/docs/book/cookbook/bootstrap.md @@ -2,7 +2,7 @@ To use the syntax of the [alerts from the Bootstrap CSS framework](https://getbootstrap.com/docs/5.2/components/alerts/) for the output of the view helper, the configuration of the message format must be adjusted. -Add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: +To do that, add the following lines to the local or global configuration file, e.g. `config/autoload/global.config.php`: ```php return [ diff --git a/docs/book/introduction.md b/docs/book/introduction.md index 6e920ab..f29b412 100644 --- a/docs/book/introduction.md +++ b/docs/book/introduction.md @@ -1,25 +1,25 @@ # Introduction Giving feedback to a user is an important part of a good application. -Flash messages are used to notify the user about a successful form submit, failure on saving in the database, wrong authentification credentials or something similar. -At the end of a request, a message is created and shown to the user at the next request. -The flash messages are self-expiring and session-based. +Flash messages provide notifications to the user, such as for successful form submissions, failure to save data in the database, and incorrect authentication credentials. +A message is created at the end of one request, and shown to the user in the next request. +Flash messages are self-expiring and session-based. -To create and expose flash messages in a laminas-mvc-based application this packages provides: +To create and expose flash messages in a laminas-mvc-based application, this packages provides: - [a controller plugin to create and retrieve messages](controller-plugin.md) - [a view helper to render the messages](view-helper.md) -A message is set in a controller and then rendered in a view script. +A flash message is set in a controller and then rendered in a view script. ## Namespaces -The controller plugin and the view helper supports different types of messages: +The controller plugin and the view helper support different types of messages: -- default -- success -- warning -- error -- info +- `default` +- `info` +- `success` +- `warning` +- `error` -These namespaces allow to handle different output formats. +These namespaces provide support for handling different output formats. diff --git a/docs/book/view-helper.md b/docs/book/view-helper.md index e04b01d..0e5be90 100644 --- a/docs/book/view-helper.md +++ b/docs/book/view-helper.md @@ -54,7 +54,7 @@ look like this: Aside from modifying the rendered CSS classes of the `FlashMessenger`, you are furthermore able to modify the generated HTML as a whole to create even more distinct visuals for your flash messages. The default output format is defined -within the source code of the `FlashMessenger` view helper itself. +within the source code of the `FlashMessenger` view helper. ```php protected $messageCloseString = '
  • '; From d9a9fca28cbc1627ba4cebfd1a4f494b23b62bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Mon, 1 Aug 2022 21:28:48 +0200 Subject: [PATCH 11/12] Updates MkDocs configuration to use standard homepage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- mkdocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 90e2337..e1073e8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,5 @@ site_description: 'Plugin for creating and exposing flash messages via laminas-m repo_url: 'https://github.com/laminas/laminas-mvc-plugin-flashmessenger' extra: project: MVC - show_special_homepage: true installation: module_class: 'Laminas\Mvc\Plugin\FlashMessenger\Module' From e1f60f26a5cdbbd9fe094131de300f8ebc854117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Mon, 1 Aug 2022 21:34:14 +0200 Subject: [PATCH 12/12] Updates wording in basic usage for rendering messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/basic-usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/basic-usage.md b/docs/book/basic-usage.md index 6c61331..d310bcd 100644 --- a/docs/book/basic-usage.md +++ b/docs/book/basic-usage.md @@ -30,7 +30,7 @@ class AlbumController extends AbstractActionController ## Render a Flash Message -Render all messages in a view script, e.g. `module/Album/view/album/album/index.phtml`: +Render all flash messages in a view script, e.g. `module/Album/view/album/album/index.phtml`: ```php flashMessenger()->render() ?>