-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.php
More file actions
61 lines (54 loc) · 2.3 KB
/
Plugin.php
File metadata and controls
61 lines (54 loc) · 2.3 KB
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
57
58
59
60
61
<?php namespace NumenCode\SyncOps;
use System\Classes\PluginBase;
use NumenCode\SyncOps\Console\DbPull;
use NumenCode\SyncOps\Console\DbPush;
use NumenCode\SyncOps\Console\Validate;
use NumenCode\SyncOps\Console\MediaPull;
use NumenCode\SyncOps\Console\MediaPush;
use NumenCode\SyncOps\Console\ProjectPull;
use NumenCode\SyncOps\Console\ProjectPush;
use NumenCode\SyncOps\Console\RemoteHealth;
use NumenCode\SyncOps\Console\ProjectBackup;
use NumenCode\SyncOps\Console\ProjectDeploy;
use NumenCode\SyncOps\Console\RemoteArtisan;
class Plugin extends PluginBase
{
public function pluginDetails()
{
return [
'name' => 'numencode.syncops::lang.plugin.name',
'description' => 'numencode.syncops::lang.plugin.description',
'author' => 'Blaz Orazem',
'icon' => 'icon-cloud-upload',
'homepage' => 'https://github.com/numencode/wn-syncops-plugin',
];
}
public function boot()
{
$this->publishes([__DIR__ . '/config/syncops.php' => config_path('syncops.php')], 'syncops-config');
}
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/config/syncops.php', 'syncops');
$this->registerHelpers();
$this->registerConsoleCommands();
}
protected function registerHelpers()
{
require_once __DIR__ . '/helpers.php';
}
protected function registerConsoleCommands()
{
$this->registerConsoleCommand('syncops.db_pull', DbPull::class);
$this->registerConsoleCommand('syncops.db_push', DbPush::class);
$this->registerConsoleCommand('syncops.media_pull', MediaPull::class);
$this->registerConsoleCommand('syncops.media_push', MediaPush::class);
$this->registerConsoleCommand('syncops.project_backup', ProjectBackup::class);
$this->registerConsoleCommand('syncops.project_deploy', ProjectDeploy::class);
$this->registerConsoleCommand('syncops.project_pull', ProjectPull::class);
$this->registerConsoleCommand('syncops.project_push', ProjectPush::class);
$this->registerConsoleCommand('syncops.remote_artisan', RemoteArtisan::class);
$this->registerConsoleCommand('syncops.remote_health', RemoteHealth::class);
$this->registerConsoleCommand('syncops.validate', Validate::class);
}
}