-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPlugin.php
More file actions
46 lines (41 loc) · 1.31 KB
/
Plugin.php
File metadata and controls
46 lines (41 loc) · 1.31 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
<?php namespace Awebsome\Serverpilot;
use Db;
use Event;
use Backend;
use Redirect;
use System\Classes\PluginBase;
use Awebsome\Serverpilot\Models\Sync;
use Awebsome\Serverpilot\Models\Settings as CFG;
use Awebsome\Serverpilot\Classes\ServerPilot;
class Plugin extends PluginBase
{
public function boot()
{
Event::listen('awebsome.serverpilot.afterSaveSettings', function() {
// Code to register $user->email to mailing list
if(ServerPilot::isAuth())
{
ServerPilot::servers()->import();
ServerPilot::sysusers()->import();
ServerPilot::apps()->import('oneToOne');
ServerPilot::dbs()->import();
}
});
}
public function registerSettings()
{
return [
//Connection Settings
'serverpilot' => [
'label' => 'ServerPilot',
'description' => 'Settings of ServerPilot',
'category' => 'ServerPilot',
'icon' => 'icon-cloud',
'class' => 'Awebsome\Serverpilot\Models\Settings',
'order' => 100,
'permissions' => ['awebsome.serverpilot.settings'],
'keywords' => 'Server ServerPilot'
],
];
}
}