Coder Social home page Coder Social logo

mis4s / notification-bundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maximiliengilet/notification-bundle

0.0 0.0 0.0 294 KB

A simple Symfony bundle to notify user

Home Page: https://packagist.org/packages/mgilet/notification-bundle

License: MIT License

PHP 98.27% HTML 1.73%

notification-bundle's Introduction

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.

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.

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

notification-bundle's People

Contributors

maximiliengilet avatar emulienfou avatar khanmaytok avatar beamop avatar leandroluccerini avatar 4ssil avatar avramcosmin avatar femaffezzolli avatar jeroenkeesom avatar kklecho avatar matthieumota avatar marcelglaeser avatar eeemarv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.