Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): fixed template of rendering success flash messages #37

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/book/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class AlbumController extends AbstractActionController

## Render a Flash Message

Render all flash messages in a view script, e.g. `module/Album/view/album/album/index.phtml`:
Render success type of flash messages in a view script, e.g. `module/Album/view/album/album/index.phtml`:

```php
<?= $this->flashMessenger()->render() ?>
<?= $this->flashMessenger()->render(FlashMessenger::NAMESPACE_SUCCESS) ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crap, why is it so complicated? This means that we need to extend the whole section to explain the usage with the default namespace and also the others.
I will create a suggestion for this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is known because in the section of the manual, it is written that the method without an argument will pull all flash messages, but this does not work and is misleading.

The tutorial and many sections have such a problem, I have not come across such a problem in the symfony documentation, if the example is in the documentation, then it should work without assumptions

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@froschdesign If isn't complicated why laminas contributors add that doc section?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistakes happen. If you find any further problems, we would be happy to hear from you.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you merge my PR?
Is it my first PR to public repo)

```

Output:
Expand Down
Loading