All Projects → maximilienGilet → Notification Bundle

maximilienGilet / Notification Bundle

Licence: mit
A simple Symfony bundle to notify user

Projects that are alternatives of or similar to Notification Bundle

Twigextensionsbundle
Useful Twig extensions for your Symfony project.
Stars: ✭ 75 (-27.18%)
Mutual labels:  bundle, symfony, symfony-bundle
Web Server Bundle
WebServerBundle provides commands for running applications using the PHP built-in web server. It simplifies your local development setup because you don't have to configure a proper web server such as Apache or Nginx to run your application.
Stars: ✭ 1,281 (+1143.69%)
Mutual labels:  bundle, symfony, symfony-bundle
Fmbbcodebundle
🔠 BBCode bundle for Symfony projects
Stars: ✭ 56 (-45.63%)
Mutual labels:  bundle, symfony, symfony-bundle
Easy Security Bundle
EasySecurityBundle
Stars: ✭ 95 (-7.77%)
Mutual labels:  bundle, symfony, symfony-bundle
Swarrotbundle
A symfony bundle for swarrot integration
Stars: ✭ 89 (-13.59%)
Mutual labels:  bundle, symfony, symfony-bundle
Neo4j Symfony
Symfony Bundle for the Neo4j Graph Database
Stars: ✭ 69 (-33.01%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatacachebundle
This bundle provides caching services
Stars: ✭ 66 (-35.92%)
Mutual labels:  bundle, symfony, symfony-bundle
Beelabrecaptcha2bundle
💻 Symfony bundle for Google Recaptcha2
Stars: ✭ 47 (-54.37%)
Mutual labels:  bundle, symfony, symfony-bundle
Pugxautocompleterbundle
Add an autocomplete field to your Symfony forms
Stars: ✭ 83 (-19.42%)
Mutual labels:  bundle, symfony, symfony-bundle
Featureflagsbundle
Symfony2 Bundle to implement Feature Flags to your Application
Stars: ✭ 63 (-38.83%)
Mutual labels:  bundle, symfony, symfony-bundle
Knpmenubundle
Object Oriented menus for your Symfony project.
Stars: ✭ 1,242 (+1105.83%)
Mutual labels:  bundle, symfony, symfony-bundle
Easy Doc Bundle
Symfony application documentation generator
Stars: ✭ 99 (-3.88%)
Mutual labels:  bundle, symfony, symfony-bundle
Cronos Bundle
Easy update your crontab by using @cron annotations in Symfony commands.
Stars: ✭ 73 (-29.13%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonataclassificationbundle
Symfony SonataClassificationBundle
Stars: ✭ 76 (-26.21%)
Mutual labels:  bundle, symfony, symfony-bundle
Liipurlautoconverterbundle
[DEPRECATED] This bundle will add a Twig Extension for templates with a new filter for automatically converting urls and emails in a string to html links
Stars: ✭ 53 (-48.54%)
Mutual labels:  bundle, symfony, symfony-bundle
Pugxgeneratorbundle
An enhancement of SensioGeneratorBundle
Stars: ✭ 58 (-43.69%)
Mutual labels:  bundle, symfony, symfony-bundle
Sncredisbundle
A Redis bundle for Symfony supporting Predis and PhpRedis
Stars: ✭ 980 (+851.46%)
Mutual labels:  bundle, symfony, symfony-bundle
Lexikpayboxbundle
LexikPayboxBundle eases the implementation of the Paybox payment system
Stars: ✭ 42 (-59.22%)
Mutual labels:  bundle, symfony, symfony-bundle
Lexikcurrencybundle
This Symfony2 bundle provide a service and a Twig extension to convert and display currencies.
Stars: ✭ 59 (-42.72%)
Mutual labels:  bundle, symfony, symfony-bundle
Foselasticabundle
Elasticsearch PHP integration for your Symfony project using Elastica.
Stars: ✭ 1,142 (+1008.74%)
Mutual labels:  bundle, symfony, symfony-bundle

mgilet/notification-bundle

An easy yet powerful notification bundle for Symfony

Latest Stable Version Latest Unstable Version Total Downloads License

SensioLabsInsight

mgilet/notificationBundle

Create and manage notifications in an efficient way.

Symfony support :

  • 2.7.x (bundle version 2.x)
  • 2.8.x (bundle version 2.x)
  • 3.x
  • 4.x

NOW SUPPORTS SYMFONY FLEX !

Version 3.0 out now.

Features

  • Easy setup
  • Easy to use
  • Powerful notification management
  • Simple Twig render methods
  • Fully customizable
  • Multiple notifiables entities
  • No bloated dependencies (little requirements)

Notice: Only Doctrine ORM is supported for now.

Upgrade from 3.x

Custom Notification entity usage

If you use a custom Notification entitiy you must remove the resolve_target_entities directive from the doctrine configuration and add a configuration file.

Example

After adding the customized notification class as in #39 just add a configuration file

config/packages/mgilet_notification.yaml

mgilet_notification:
  notification_class: App\Entity\MyCustomNotification

Installation & usage

This bundle is available on packagist.

Add notification-bundle to your project :

$ composer require mgilet/notification-bundle

See documentation for next steps

Basic usage

class MyController extends Controller
{

    ...

    public function sendNotification(Request $request)
    {
      $manager = $this->get('mgilet.notification');
      $notif = $manager->createNotification('Hello world!');
      $notif->setMessage('This a notification.');
      $notif->setLink('https://symfony.com/');
      // or the one-line method :
      // $manager->createNotification('Notification subject', 'Some random text', 'https://google.fr/');

      // you can add a notification to a list of entities
      // the third parameter `$flush` allows you to directly flush the entities
      $manager->addNotification(array($this->getUser()), $notif, true);

      ...
    }

Translations

For now this bundle is only translated to de, en, es, fa, fr, it, nl, pt_BR, pl.

Help me improve this by submitting your translations.

Community

You can help make this bundle better by contributing (every pull request will be considered) or submitting an issue.

Enjoy and share if you like it.

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].