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

200 lines
5.9 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
2018-10-04 19:10:43 +02:00
namespace App\Providers;
2020-06-22 00:34:02 +02:00
use App\Events\Client\ClientWasArchived;
2019-04-20 03:19:43 +02:00
use App\Events\Client\ClientWasCreated;
2020-06-22 00:34:02 +02:00
use App\Events\Client\ClientWasDeleted;
use App\Events\Client\ClientWasRestored;
use App\Events\Client\ClientWasUpdated;
use App\Events\Client\DesignWasDeleted;
use App\Events\Client\DesignWasRestored;
use App\Events\Client\DesignWasUpdated;
use App\Events\Company\CompanyWasDeleted;
2019-07-10 03:50:49 +02:00
use App\Events\Contact\ContactLoggedIn;
use App\Events\Credit\CreditWasMarkedSent;
2020-06-22 00:34:02 +02:00
use App\Events\Design\DesignWasArchived;
use App\Events\Invoice\InvoiceWasCancelled;
2019-05-15 07:03:18 +02:00
use App\Events\Invoice\InvoiceWasCreated;
use App\Events\Invoice\InvoiceWasDeleted;
use App\Events\Invoice\InvoiceWasEmailed;
use App\Events\Invoice\InvoiceWasMarkedSent;
use App\Events\Invoice\InvoiceWasPaid;
use App\Events\Invoice\InvoiceWasReversed;
2019-05-15 07:03:18 +02:00
use App\Events\Invoice\InvoiceWasUpdated;
use App\Events\Misc\InvitationWasViewed;
2019-05-13 08:18:46 +02:00
use App\Events\Payment\PaymentWasCreated;
use App\Events\Payment\PaymentWasDeleted;
use App\Events\Payment\PaymentWasRefunded;
use App\Events\Payment\PaymentWasVoided;
use App\Events\Quote\QuoteWasApproved;
2019-06-03 23:46:46 +02:00
use App\Events\User\UserLoggedIn;
2019-06-12 06:22:05 +02:00
use App\Events\User\UserWasCreated;
use App\Events\User\UserWasDeleted;
2019-05-13 08:18:46 +02:00
use App\Listeners\Activity\CreatedClientActivity;
2019-05-15 07:03:18 +02:00
use App\Listeners\Activity\PaymentCreatedActivity;
use App\Listeners\Activity\PaymentDeletedActivity;
use App\Listeners\Activity\PaymentRefundedActivity;
use App\Listeners\Activity\PaymentVoidedActivity;
2019-07-10 03:50:49 +02:00
use App\Listeners\Contact\UpdateContactLastLogin;
use App\Listeners\Document\DeleteCompanyDocuments;
use App\Listeners\Invoice\CreateInvoiceActivity;
use App\Listeners\Invoice\CreateInvoiceHtmlBackup;
use App\Listeners\Invoice\CreateInvoiceInvitation;
2019-08-29 06:07:04 +02:00
use App\Listeners\Invoice\CreateInvoicePdf;
use App\Listeners\Invoice\InvoiceDeletedActivity;
use App\Listeners\Invoice\InvoiceEmailActivity;
use App\Listeners\Invoice\InvoiceEmailFailedActivity;
use App\Listeners\Invoice\InvoiceEmailedNotification;
use App\Listeners\Invoice\UpdateInvoiceActivity;
2019-10-02 00:44:13 +02:00
use App\Listeners\Invoice\UpdateInvoiceInvitations;
use App\Listeners\Misc\InvitationViewedListener;
use App\Listeners\Payment\PaymentNotification;
use App\Listeners\Quote\ReachWorkflowSettings;
2018-10-24 05:50:15 +02:00
use App\Listeners\SendVerificationNotification;
use App\Listeners\SetDBListener;
use App\Listeners\User\DeletedUserActivity;
2019-06-03 23:46:46 +02:00
use App\Listeners\User\UpdateUserLastLogin;
2018-10-04 19:10:43 +02:00
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
2019-06-12 06:22:05 +02:00
UserWasCreated::class => [
2018-10-24 05:50:15 +02:00
SendVerificationNotification::class,
2019-04-20 03:19:43 +02:00
],
UserWasDeleted::class => [
DeletedUserActivity::class,
],
2019-06-03 23:46:46 +02:00
UserLoggedIn::class => [
UpdateUserLastLogin::class,
],
2019-07-10 03:50:49 +02:00
ContactLoggedIn::class => [
UpdateContactLastLogin::class,
],
2019-05-13 08:18:46 +02:00
PaymentWasCreated::class => [
PaymentCreatedActivity::class,
PaymentNotification::class,
2019-05-13 08:18:46 +02:00
],
PaymentWasDeleted::class => [
PaymentDeletedActivity::class,
],
PaymentWasRefunded::class => [
PaymentRefundedActivity::class,
],
PaymentWasVoided::class => [
PaymentVoidedActivity::class,
],
2020-06-22 00:34:02 +02:00
// Clients
ClientWasCreated::class =>[
CreatedClientActivity::class,
2019-04-20 03:19:43 +02:00
],
2020-06-22 00:34:02 +02:00
ClientWasArchived::class =>[
2019-04-20 03:19:43 +02:00
],
2020-06-22 00:34:02 +02:00
ClientWasUpdated::class =>[
2019-04-20 03:19:43 +02:00
],
2020-06-22 00:34:02 +02:00
ClientWasDeleted::class =>[
],
ClientWasRestored::class =>[
2019-04-20 03:19:43 +02:00
],
2020-06-24 13:49:06 +02:00
// Documents
DocumentWasCreated::class =>[
],
DocumentWasArchived::class =>[
],
DocumentWasUpdated::class =>[
],
DocumentWasDeleted::class =>[
],
DocumentWasRestored::class =>[
],
CreditWasMarkedSent::class => [
],
2020-06-22 00:34:02 +02:00
//Designs
DesignWasArchived::class => [
],
DesignWasUpdated::class => [
],
DesignWasDeleted::class => [
],
DesignWasRestored::class => [
],
//Invoices
InvoiceWasMarkedSent::class => [
CreateInvoiceHtmlBackup::class,
2019-05-15 07:03:18 +02:00
],
InvoiceWasUpdated::class => [
UpdateInvoiceActivity::class,
2019-08-29 06:07:04 +02:00
CreateInvoicePdf::class,
2019-05-15 07:03:18 +02:00
],
InvoiceWasCreated::class => [
CreateInvoiceActivity::class,
// CreateInvoicePdf::class,
],
InvoiceWasPaid::class => [
CreateInvoiceHtmlBackup::class,
],
InvoiceWasEmailed::class => [
InvoiceEmailActivity::class,
InvoiceEmailedNotification::class,
],
InvoiceWasEmailedAndFailed::class => [
InvoiceEmailFailedActivity::class,
],
InvoiceWasDeleted::class => [
InvoiceDeletedActivity::class,
],
InvoiceWasReversed::class => [
],
InvoiceWasCancelled::class => [
],
InvitationWasViewed::class => [
InvitationViewedListener::class
],
CompanyWasDeleted::class => [
DeleteCompanyDocuments::class,
],
QuoteWasApproved::class => [
ReachWorkflowSettings::class,
],
];
/**
* The subscriber classes to register.
*
* @var array
*/
protected $subscribe = [
2018-10-04 19:10:43 +02:00
];
/**
* Register any events for your application.
*
* @return void
*/
// public function boot()
// {
// parent::boot();
// }
2019-06-05 02:43:23 +02:00
public function boot()
{
parent::boot();
}
2018-10-04 19:10:43 +02:00
}