2017 © Pedro Peláez
 

symfony-bundle notification-bundle

Bundle to work with GrossumNotificationServer

image

grossum/notification-bundle

Bundle to work with GrossumNotificationServer

  • Monday, April 10, 2017
  • by WhiteEagle88
  • Repository
  • 9 Watchers
  • 4 Stars
  • 403 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

NotificationBundle to work with GrossumNotificationServer, (*1)

Instalation:, (*2)

composer require grossum/notification-bundle

Register the bundle:, (*3)

    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            new GrossumUA\NotificationBundle\NotificationBundle(),
            new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
        );
    }

Add config:, (*4)


#app/config/config.yml old_sound_rabbit_mq: connections: default: host: %notification_service_ip% port: %notification_service_port% user: %notification_service_user% password: %notification_service_pass% vhost: %notification_service_vhost% lazy: true connection_timeout: 3 read_write_timeout: 3 keepalive: false heartbeat: 0 producers: send_sms: connection: default exchange_options: {name: 'send-sms', type: direct} send_email: connection: default exchange_options: {name: 'send-email', type: direct} send_push: connection: default exchange_options: {name: 'send-push', type: direct} send_web: connection: default exchange_options: {name: 'send-web', type: direct}

Add paramters:, (*5)


#app/config/paramters.yml parameters: notification_service_ip: 127.0.0.1 notification_service_port: 5642 notification_service_user: user notification_service_pass: pass notification_service_vhost: vhost

Available notifications:, (*6)

  1. EmailNotification
  2. EntityDataDeleteNotification
  3. EntityDataUpdateNotification
  4. MessageNotification
  5. PushNotification
  6. SmsNotification

Example usage:, (*7)


$userNotification = new MessageNotification(); $userNotification ->setType(NotificationInterface::SOCKET_NOTIFICATION_TYPE_WEB_NOTIFICATION) ->setContent('You have created task to demo NotificationBundle') ->setMediaUrl('https://pbs.twimg.com/profile_images/564783819580903424/2aQazOP3.png') ->setTitle('You have created task to demo NotificationBundle') ->setCreatedAt(new \DateTime()) ->setRecipientHashes(['sds12']); $this->disptacher->dispatch( 'grossum.notification.event.send_notification', new NotificationCreatedEvent($userNotification) );

The Versions

10/04 2017

dev-master

9999999-dev

Bundle to work with GrossumNotificationServer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Verkeenko
by Myroslav Berlad

grossum notification bundle

15/12 2016

1.0.1

1.0.1.0

Bundle to work with GrossumNotificationServer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Verkeenko
by Myroslav Berlad

grossum notification bundle

29/11 2016

1.0

1.0.0.0

Bundle to work with GrossumNotificationServer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Alexey Verkeenko
by Myroslav Berlad

grossum notification bundle