2017 © Pedro Peláez
 

symfony-bundle notification-bundle

A simple Symfony 3 bundle for user notifications

image

mgilet/notification-bundle

A simple Symfony 3 bundle for user notifications

  • Wednesday, July 25, 2018
  • by maximilienGilet
  • Repository
  • 10 Watchers
  • 52 Stars
  • 9,022 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 25 Forks
  • 8 Open issues
  • 10 Versions
  • 39 % Grown

The README.md

mgilet/notification-bundle

An easy yet powerful notification bundle for Symfony

Latest Stable Version Latest Unstable Version Total Downloads License , (*1)

SensioLabsInsight , (*2)

mgilet/notificationBundle, (*3)

Create and manage notifications in an efficient way., (*4)

Symfony support : * 2.7.x (bundle version 2.x) * 2.8.x (bundle version 2.x) * 3.x * 4.x, (*5)

NOW SUPPORTS SYMFONY FLEX !

Version 3.0 out now., (*6)

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., (*7)

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., (*8)

Example

After adding the customized notification class as in #39 just add a configuration file, (*9)

config/packages/mgilet_notification.yaml, (*10)

mgilet_notification:
  notification_class: App\Entity\MyCustomNotification

Installation & usage

This bundle is available on packagist., (*11)

Add notification-bundle to your project :, (*12)

$ composer require mgilet/notification-bundle

See documentation for next steps, (*13)

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., (*14)

Help me improve this by submitting your translations., (*15)

Community

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

Enjoy and share if you like it., (*17)

Licence

MIT, (*18)

The Versions

25/07 2018

dev-master

9999999-dev

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

29/06 2018

3.0.1

3.0.1.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

28/06 2018

3.0.0

3.0.0.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

28/06 2018

dev-dev

dev-dev

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

24/11 2017

2.0.3

2.0.3.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

15/11 2017

2.0.2

2.0.2.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

18/10 2017

2.0.1

2.0.1.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

17/10 2017

2.0

2.0.0.0

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

25/07 2016

dev-unstable

dev-unstable

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple

14/07 2016

1.0.0-alpha-1

1.0.0.0-alpha1

A simple Symfony 3 bundle for user notifications

  Sources   Download

MIT

The Requires

 

by Maximilien Gilet

symfony notification bundle simple