renamed module events
This commit is contained in:
@ -4,7 +4,7 @@ namespace Modules\PaypalStandard\Listeners;
|
||||
|
||||
use App\Events\Module\PaymentMethodShowing as Event;
|
||||
|
||||
class ShowPaymentMethod
|
||||
class ShowAsPaymentMethod
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
20
modules/PaypalStandard/Providers/Event.php
Normal file
20
modules/PaypalStandard/Providers/Event.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PaypalStandard\Providers;
|
||||
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as Provider;
|
||||
use Modules\PaypalStandard\Listeners\ShowAsPaymentMethod;
|
||||
|
||||
class Event extends Provider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the module.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
\App\Events\Module\PaymentMethodShowing::class => [
|
||||
ShowAsPaymentMethod::class,
|
||||
],
|
||||
];
|
||||
}
|
@ -3,7 +3,6 @@
|
||||
namespace Modules\PaypalStandard\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider as Provider;
|
||||
use Modules\PaypalStandard\Listeners\ShowPaymentMethod;
|
||||
|
||||
class Main extends Provider
|
||||
{
|
||||
@ -16,7 +15,6 @@ class Main extends Provider
|
||||
{
|
||||
$this->loadTranslations();
|
||||
$this->loadViews();
|
||||
$this->loadEvents();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,16 +47,6 @@ class Main extends Provider
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'paypal-standard');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadEvents()
|
||||
{
|
||||
$this->app['events']->listen(\App\Events\Module\PaymentMethodShowing::class, ShowPaymentMethod::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load routes.
|
||||
*
|
||||
|
@ -5,6 +5,7 @@
|
||||
"category": "payment-method",
|
||||
"active": 1,
|
||||
"providers": [
|
||||
"Modules\\PaypalStandard\\Providers\\Event",
|
||||
"Modules\\PaypalStandard\\Providers\\Main"
|
||||
],
|
||||
"aliases": {},
|
||||
|
Reference in New Issue
Block a user