1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/app/Providers/EventServiceProvider.php

277 lines
9.9 KiB
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Providers;
2015-03-12 01:44:39 +01:00
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
2017-01-30 17:05:31 +01:00
class EventServiceProvider extends ServiceProvider
{
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
2016-08-31 21:10:41 +02:00
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',
],
2017-12-26 15:35:31 +01:00
'App\Events\ClientWasUpdated' => [
'App\Listeners\SubscriptionListener@updatedClient',
],
2015-10-28 20:22:07 +01:00
'App\Events\ClientWasDeleted' => [
'App\Listeners\ActivityListener@deletedClient',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@deletedClient',
2018-03-14 09:48:16 +01:00
'App\Listeners\HistoryListener@deletedClient',
2015-10-28 20:22:07 +01:00
],
'App\Events\ClientWasRestored' => [
'App\Listeners\ActivityListener@restoredClient',
],
// Invoices
'App\Events\InvoiceWasCreated' => [
'App\Listeners\ActivityListener@createdInvoice',
'App\Listeners\InvoiceListener@createdInvoice',
2015-10-28 20:22:07 +01:00
],
'App\Events\InvoiceWasUpdated' => [
'App\Listeners\ActivityListener@updatedInvoice',
'App\Listeners\InvoiceListener@updatedInvoice',
2017-04-09 08:41:02 +02:00
],
'App\Events\InvoiceItemsWereCreated' => [
'App\Listeners\SubscriptionListener@createdInvoice',
],
'App\Events\InvoiceItemsWereUpdated' => [
'App\Listeners\SubscriptionListener@updatedInvoice',
2015-10-28 20:22:07 +01:00
],
'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',
2018-03-14 09:48:16 +01:00
'App\Listeners\HistoryListener@deletedInvoice',
2019-01-30 11:45:46 +01:00
'App\Listeners\SubscriptionListener@deletedInvoice',
2015-10-28 20:22:07 +01:00
],
'App\Events\InvoiceWasRestored' => [
'App\Listeners\ActivityListener@restoredInvoice',
],
'App\Events\InvoiceWasEmailed' => [
2017-12-26 11:03:23 +01:00
'App\Listeners\InvoiceListener@emailedInvoice',
2017-12-26 11:11:58 +01:00
'App\Listeners\NotificationListener@emailedInvoice',
2015-10-28 20:22:07 +01:00
],
'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\Events\QuoteWasUpdated' => [
'App\Listeners\ActivityListener@updatedQuote',
2017-04-09 08:41:02 +02:00
],
'App\Events\QuoteItemsWereCreated' => [
'App\Listeners\SubscriptionListener@createdQuote',
],
'App\Events\QuoteItemsWereUpdated' => [
'App\Listeners\SubscriptionListener@updatedQuote',
2015-10-28 20:22:07 +01:00
],
'App\Events\QuoteWasArchived' => [
'App\Listeners\ActivityListener@archivedQuote',
],
'App\Events\QuoteWasDeleted' => [
'App\Listeners\ActivityListener@deletedQuote',
2018-03-14 09:48:16 +01:00
'App\Listeners\HistoryListener@deletedQuote',
2019-01-30 11:45:46 +01:00
'App\Listeners\SubscriptionListener@deletedQuote',
2015-10-28 20:22:07 +01:00
],
'App\Events\QuoteWasRestored' => [
'App\Listeners\ActivityListener@restoredQuote',
],
'App\Events\QuoteWasEmailed' => [
2017-12-26 11:11:58 +01:00
'App\Listeners\QuoteListener@emailedQuote',
2015-10-28 20:22:07 +01:00
'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',
2017-12-31 10:01:02 +01:00
'App\Listeners\SubscriptionListener@approvedQuote',
2015-10-28 20:22:07 +01:00
],
// 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',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@deletedPayment',
2015-10-28 20:22:07 +01:00
],
2016-04-23 22:40:19 +02:00
'App\Events\PaymentWasRefunded' => [
'App\Listeners\ActivityListener@refundedPayment',
'App\Listeners\InvoiceListener@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\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',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@createdTask',
],
2017-01-30 17:05:31 +01:00
'App\Events\TaskWasUpdated' => [
'App\Listeners\ActivityListener@updatedTask',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@updatedTask',
],
2017-01-30 17:05:31 +01:00
'App\Events\TaskWasRestored' => [
'App\Listeners\ActivityListener@restoredTask',
],
2017-01-30 17:05:31 +01:00
'App\Events\TaskWasArchived' => [
'App\Listeners\ActivityListener@archivedTask',
],
2017-01-30 17:05:31 +01:00
'App\Events\TaskWasDeleted' => [
'App\Listeners\ActivityListener@deletedTask',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@deletedTask',
2018-03-14 09:48:16 +01:00
'App\Listeners\HistoryListener@deletedTask',
2017-12-26 15:35:31 +01:00
],
// Vendor events
'App\Events\VendorWasCreated' => [
'App\Listeners\SubscriptionListener@createdVendor',
],
'App\Events\VendorWasUpdated' => [
'App\Listeners\SubscriptionListener@updatedVendor',
],
'App\Events\VendorWasDeleted' => [
'App\Listeners\SubscriptionListener@deletedVendor',
],
2017-01-30 17:05:31 +01:00
// Expense events
'App\Events\ExpenseWasCreated' => [
'App\Listeners\ActivityListener@createdExpense',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@createdExpense',
],
2017-01-30 17:05:31 +01:00
'App\Events\ExpenseWasUpdated' => [
'App\Listeners\ActivityListener@updatedExpense',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@updatedExpense',
],
2017-01-30 17:05:31 +01:00
'App\Events\ExpenseWasRestored' => [
'App\Listeners\ActivityListener@restoredExpense',
],
2017-01-30 17:05:31 +01:00
'App\Events\ExpenseWasArchived' => [
'App\Listeners\ActivityListener@archivedExpense',
],
2017-01-30 17:05:31 +01:00
'App\Events\ExpenseWasDeleted' => [
'App\Listeners\ActivityListener@deletedExpense',
2017-12-26 15:35:31 +01:00
'App\Listeners\SubscriptionListener@deletedExpense',
2018-03-14 09:48:16 +01:00
'App\Listeners\HistoryListener@deletedExpense',
],
// Project events
'App\Events\ProjectWasDeleted' => [
'App\Listeners\HistoryListener@deletedProject',
],
// Proposal events
'App\Events\ProposalWasDeleted' => [
'App\Listeners\HistoryListener@deletedProposal',
],
2017-03-09 13:23:30 +01:00
'Illuminate\Queue\Events\JobExceptionOccurred' => [
'App\Listeners\InvoiceListener@jobFailed'
],
//DNS Add A record to Cloudflare
'App\Events\SubdomainWasUpdated' => [
'App\Listeners\DNSListener@addDNSRecord'
],
//DNS Remove A record from Cloudflare
'App\Events\SubdomainWasRemoved' => [
'App\Listeners\DNSListener@removeDNSRecord'
2017-03-09 13:23:30 +01:00
]
/*
// Update events
\Codedge\Updater\Events\UpdateAvailable::class => [
2017-01-30 20:40:43 +01:00
\Codedge\Updater\Listeners\SendUpdateAvailableNotification::class,
],
2017-03-09 13:23:30 +01:00
*/
2017-01-30 17:05:31 +01:00
];
2015-03-12 01:44:39 +01:00
2017-01-30 17:05:31 +01:00
/**
* Register any other events for your application.
*
2017-01-30 20:40:43 +01:00
* @param \Illuminate\Contracts\Events\Dispatcher $events
*
2017-01-30 17:05:31 +01:00
* @return void
*/
2017-11-14 09:58:08 +01:00
public function boot()
2017-01-30 17:05:31 +01:00
{
2017-11-14 09:58:08 +01:00
parent::boot();
2015-03-12 01:44:39 +01:00
2017-01-30 17:05:31 +01:00
//
}
2015-03-12 01:44:39 +01:00
}