Download the PHP package irishdan/notification-bundle without Composer
On this page you can find all versions of the php package irishdan/notification-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download irishdan/notification-bundle
More information about irishdan/notification-bundle
Files in irishdan/notification-bundle
Package notification-bundle
Short Description A notification bundle for the Symfony framework
License MIT
Homepage https://danbyrne.me/notification-bundle
Informations about the package notification-bundle
NotificationBundle
Overview
This NotificationBundle allows for the easy creation and and sending of messages to users or other sources, via multiple channels. Its also enables easy broadcasting of data or messages via.
Out of the box with minimal configuration notifications can be sent to single or groups of users, via, email, SMS, slack and websockets (pusher).
Combine this bundle with FoundationInk Bundle to send beautiful html emails for any event Combine a pusher channel with taostr for instant and attractive notifications Combine a pusher channel and a database channel for simple direct messaging.
Basic setup
Out of the box, NotificationImage bundle should work with minimal configuration.
Step 1: Download and enable the bundle
Download with composer
Enable the bundle in the kernel
Step 2: Configure some Notification Channels
Out of the box the bundle supports several channels, including:
- mail (Email)
- database
- slack
- nexmo (SMS)
- pusher (Websockets)
- logger
To enable a channel simple add its configuration to your config.yml
It's also possible to create alter an existing channel's behavior
Step 4: Database, Pusher, Nexmo, and Slack channels have additional steps.
Some channels require additional steps
Database channel
The Database channel essentially persists a Doctrine entity to the database. A generator is provided to create the entity.
Pusher channel
Pusher is a a third party service with a decent free package. You need valid pusher credendials to use the channel.
The pusher PHP library is required also. Install with composer
If you are using private channels (HIGHLY RECOMMENDED), the pusher authentication route is needed. Import the route into your project
Pusher requires a javascript library and additional to interact with pusher channel you have defined. Twig functions are provided which generate the required javascript
Nexmo channel
Nexmo Is a third party SMS service. You need valid credentials to use this channel.
Slack shannel
Step 5: Subscribe Users to one or more channels
In order for users to be sent notifications through the channels you have configured they must be subscribed to each channel.
Assuming your User class is AppBundle\Entity\User, implement the required interfaces: @TODO: Improve this
Step 6: Generate Notification objects
Each Notification is a separate Object. So for example you might have a NewMemberNotification() object and a NewPaymentReceivedNotification() object.
To create a new Notification object use the provided generator.
Step 7: Edit the Notification content
Uses twig...
Step 8: Send Notifications
To sent a notification, you need a Recipient.
Recipients are objects that implements NotifiableInterface, created in [step 5]() Notifications are objects that implement Notification interface, generated in [step 6]()
Notifications are sent using the 'notification.manager' service like so:
Documentation
For more advanced setup read the Documentation
- Installation and Setup
- Channels
- Adapters
- Broadcast
- Events & Qeueing
- Commands
- Tests
Attribution
- This bundle was inspired by the Laravel notification system