1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00
invoiceninja/app/Providers/EventServiceProvider.php

178 lines
6.3 KiB
PHP
Raw Normal View History

2015-03-12 01:44:39 +01:00
<?php namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider {
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
2015-10-28 20:22:07 +01:00
// Clients
'App\Events\ClientWasCreated' => [
'App\Listeners\ActivityListener@createdClient',
'App\Listeners\SubscriptionListener@createdClient',
],
'App\Events\ClientWasArchived' => [
'App\Listeners\ActivityListener@archivedClient',
],
'App\Events\ClientWasDeleted' => [
'App\Listeners\ActivityListener@deletedClient',
],
'App\Events\ClientWasRestored' => [
'App\Listeners\ActivityListener@restoredClient',
],
// Invoices
'App\Events\InvoiceWasCreated' => [
'App\Listeners\ActivityListener@createdInvoice',
'App\Listeners\SubscriptionListener@createdInvoice',
'App\Listeners\InvoiceListener@createdInvoice',
2015-10-28 20:22:07 +01:00
],
'App\Events\InvoiceWasUpdated' => [
'App\Listeners\ActivityListener@updatedInvoice',
'App\Listeners\InvoiceListener@updatedInvoice',
],
'App\Events\InvoiceWasArchived' => [
'App\Listeners\ActivityListener@archivedInvoice',
],
'App\Events\InvoiceWasDeleted' => [
'App\Listeners\ActivityListener@deletedInvoice',
'App\Listeners\TaskListener@deletedInvoice',
2016-07-03 14:56:01 +02:00
'App\Listeners\ExpenseListener@deletedInvoice',
2015-10-28 20:22:07 +01:00
],
'App\Events\InvoiceWasRestored' => [
'App\Listeners\ActivityListener@restoredInvoice',
],
'App\Events\InvoiceWasEmailed' => [
'App\Listeners\NotificationListener@emailedInvoice',
],
'App\Events\InvoiceInvitationWasEmailed' => [
'App\Listeners\ActivityListener@emailedInvoice',
],
'App\Events\InvoiceInvitationWasViewed' => [
'App\Listeners\ActivityListener@viewedInvoice',
'App\Listeners\NotificationListener@viewedInvoice',
'App\Listeners\InvoiceListener@viewedInvoice',
],
// Quotes
'App\Events\QuoteWasCreated' => [
'App\Listeners\ActivityListener@createdQuote',
'App\Listeners\SubscriptionListener@createdQuote',
],
'App\Events\QuoteWasUpdated' => [
'App\Listeners\ActivityListener@updatedQuote',
],
'App\Events\QuoteWasArchived' => [
'App\Listeners\ActivityListener@archivedQuote',
],
'App\Events\QuoteWasDeleted' => [
'App\Listeners\ActivityListener@deletedQuote',
],
'App\Events\QuoteWasRestored' => [
'App\Listeners\ActivityListener@restoredQuote',
],
'App\Events\QuoteWasEmailed' => [
'App\Listeners\NotificationListener@emailedQuote',
],
'App\Events\QuoteInvitationWasEmailed' => [
'App\Listeners\ActivityListener@emailedQuote',
],
'App\Events\QuoteInvitationWasViewed' => [
'App\Listeners\ActivityListener@viewedQuote',
'App\Listeners\NotificationListener@viewedQuote',
'App\Listeners\QuoteListener@viewedQuote',
],
'App\Events\QuoteInvitationWasApproved' => [
'App\Listeners\ActivityListener@approvedQuote',
'App\Listeners\NotificationListener@approvedQuote',
],
// Payments
'App\Events\PaymentWasCreated' => [
'App\Listeners\ActivityListener@createdPayment',
'App\Listeners\SubscriptionListener@createdPayment',
'App\Listeners\InvoiceListener@createdPayment',
'App\Listeners\NotificationListener@createdPayment',
'App\Listeners\AnalyticsListener@trackRevenue',
2015-10-28 20:22:07 +01:00
],
'App\Events\PaymentWasArchived' => [
'App\Listeners\ActivityListener@archivedPayment',
],
'App\Events\PaymentWasDeleted' => [
'App\Listeners\ActivityListener@deletedPayment',
'App\Listeners\InvoiceListener@deletedPayment',
'App\Listeners\CreditListener@deletedPayment',
],
2016-04-23 22:40:19 +02:00
'App\Events\PaymentWasRefunded' => [
'App\Listeners\ActivityListener@refundedPayment',
'App\Listeners\InvoiceListener@refundedPayment',
'App\Listeners\CreditListener@refundedPayment',
],
2016-05-06 23:05:42 +02:00
'App\Events\PaymentWasVoided' => [
'App\Listeners\ActivityListener@voidedPayment',
'App\Listeners\InvoiceListener@voidedPayment',
],
2016-04-30 23:54:56 +02:00
'App\Events\PaymentFailed' => [
'App\Listeners\ActivityListener@failedPayment',
'App\Listeners\InvoiceListener@failedPayment',
],
2015-10-28 20:22:07 +01:00
'App\Events\PaymentWasRestored' => [
'App\Listeners\ActivityListener@restoredPayment',
'App\Listeners\InvoiceListener@restoredPayment',
2015-10-28 20:22:07 +01:00
],
// Credits
'App\Events\CreditWasCreated' => [
'App\Listeners\ActivityListener@createdCredit',
'App\Listeners\SubscriptionListener@createdCredit',
],
'App\Events\CreditWasArchived' => [
'App\Listeners\ActivityListener@archivedCredit',
],
'App\Events\CreditWasDeleted' => [
'App\Listeners\ActivityListener@deletedCredit',
],
'App\Events\CreditWasRestored' => [
'App\Listeners\ActivityListener@restoredCredit',
],
// User events
2015-09-25 11:57:40 +02:00
'App\Events\UserSignedUp' => [
'App\Listeners\HandleUserSignedUp',
],
2015-03-31 19:42:37 +02:00
'App\Events\UserLoggedIn' => [
'App\Listeners\HandleUserLoggedIn',
],
'App\Events\UserSettingsChanged' => [
'App\Listeners\HandleUserSettingsChanged',
],
// Task events
'App\Events\TaskWasCreated' => [
'App\Listeners\ActivityListener@createdTask',
],
'App\Events\TaskWasUpdated' => [
'App\Listeners\ActivityListener@updatedTask',
],
2015-03-12 01:44:39 +01:00
];
/**
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function boot(DispatcherContract $events)
{
parent::boot($events);
//
}
}