forked from OFFLINE-GmbH/oc-mall-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.php
56 lines (46 loc) · 1.7 KB
/
Plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php namespace OFFLINE\Mall;
use Illuminate\Support\Facades\View;
use OFFLINE\Mall\Classes\Registration\BootComponents;
use OFFLINE\Mall\Classes\Registration\BootEvents;
use OFFLINE\Mall\Classes\Registration\BootExtensions;
use OFFLINE\Mall\Classes\Registration\BootMails;
use OFFLINE\Mall\Classes\Registration\BootRelations;
use OFFLINE\Mall\Classes\Registration\BootServiceContainer;
use OFFLINE\Mall\Classes\Registration\BootSettings;
use OFFLINE\Mall\Classes\Registration\BootTwig;
use OFFLINE\Mall\Classes\Registration\BootValidation;
use OFFLINE\Mall\Console\Initialize;
use OFFLINE\Mall\Console\ReindexProducts;
use OFFLINE\Mall\Console\SeedDemoData;
use OFFLINE\Mall\Console\SystemCheck;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
public $require = ['RainLab.User', 'RainLab.Location'];
use BootEvents;
use BootExtensions;
use BootServiceContainer;
use BootSettings;
use BootComponents;
use BootMails;
use BootValidation;
use BootTwig;
use BootRelations;
public function register()
{
$this->registerServices();
$this->registerTwigEnvironment();
}
public function boot()
{
$this->registerExtensions();
$this->registerEvents();
$this->registerValidationRules();
$this->registerConsoleCommand('offline.mall.seed-demo', SeedDemoData::class);
$this->registerConsoleCommand('offline.mall.reindex', ReindexProducts::class);
$this->registerConsoleCommand('offline.mall.system-check', SystemCheck::class);
$this->registerConsoleCommand('offline.mall.initialize', Initialize::class);
$this->registerRelations();
View::share('app_url', config('app.url'));
}
}