Skip to content

tanujdave/notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Notify - Priority Messaging

Notify is messaging service for Omega2. which responsible for sending message to Alpha or AWS sns based on priority.

Installing Notify as Bundle

The recommended way to install ApiClient is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Notify:

php composer.phar require printi/notify

You can then later update notify using composer:

composer.phar update printi/notify

User Guide

Basic notify configuration:

For eg:

notify:
    transition:
        send_to_prepress: high
        prepress_reject: low
        prepress_reject_failed: high
        prepress_approve: high
        send_to_production: high
        waiting_for_upload: high
        new_upload: low
        cancel: high
        finish: high

This configuration is not mandatory for our application. we can override above configuration by creating notify.yaml yaml file under /config/packages folder.

How to use

We can inject Notify as a service into our application.

for eg:

namespace App;
use Printi\NotifyBundle\Notify;

class HelloClass {

    private $notify;
    
    public function __construct(Notify $notify)
    {
        $this->notify = $notify;
    }
    
    public function onTransitionUpdate()
    {
        $message = [
            "order_item_id" => 11111,
            "transition"    => 'prepress_reject',
            "reference"     => null,
            "status_id"     => 50,
            "version"       => 2,
        ];
        $this->notify->notifyOnTransition('prepress_reject', $message);
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages