m-adamski / symfony-notification-bundle
Bundle for Symfony which helps display information for the user
Installs: 824
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- symfony/framework-bundle: ^7.0
- symfony/twig-bundle: ^7.0
Requires (Dev)
- kint-php/kint: ^5.0
- symfony/test-pack: ^1.0
README
The Symfony Bundle, which aims to simplify the communication with the end user. By using simple functions, we can create information that will later be displayed to the user.
This bundle is compatible with Symfony 4.1 and Symfony 5.0. Symfony 3.4 compatibility abandoned.
Installation
This bundle can be installed by Composer:
$ composer require m-adamski/symfony-notification-bundle
How to use it?
The helper provides a set of functions with which you can add a notification to the set, create a notification redirection, clear the list of all notifications.
Method | Description |
---|---|
addNotification | The function adds a notification of a specific type and message content |
redirectNotification | The function returns a redirection to a specific URL address and adds a notification about certain parameters |
routeRedirectNotification | Like the redirectNotification function, a redirection to a specific route is returned. Notification is created and added to set |
clear | The function clears the set of all notifications |
getNotifications | The function returns a list of all notifications |
In order for the notifications to be displayed, a reference to the function should be placed in the template.
{{ notification() }}
License
MIT