-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServiceProvider.php
executable file
·114 lines (96 loc) · 1.97 KB
/
ServiceProvider.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
namespace Acms\Plugins\ChatWork;
use ACMS_App;
use Acms\Services\Common\HookFactory;
use Acms\Services\Common\InjectTemplate;
class ServiceProvider extends ACMS_App
{
/**
* @var string
*/
public $version = '1.0.5';
/**
* @var string
*/
public $name = 'ChatWork';
/**
* @var string
*/
public $author = 'com.appleple';
/**
* @var bool
*/
public $module = false;
/**
* @var bool|string
*/
public $menu = false;
/**
* @var string
*/
public $desc = 'ChatWork API と連携し、フォームの送信内容を ChatWork で通知するための機能を提供します。';
/**
* サービスの初期処理
*/
public function init()
{
$hook = HookFactory::singleton();
$hook->attach('ChatWorkHook', new Hook);
$inect = InjectTemplate::singleton();
$inect->add('admin-form', PLUGIN_DIR . $this->name . '/template/admin/form.html');
}
/**
* インストールする前の環境チェック処理
*
* @return bool
*/
public function checkRequirements()
{
return true;
}
/**
* インストールするときの処理
* データベーステーブルの初期化など
*
* @return void
*/
public function install()
{
}
/**
* アンインストールするときの処理
* データベーステーブルの始末など
*
* @return void
*/
public function uninstall()
{
}
/**
* アップデートするときの処理
*
* @return bool
*/
public function update()
{
return true;
}
/**
* 有効化するときの処理
*
* @return bool
*/
public function activate()
{
return true;
}
/**
* 無効化するときの処理
*
* @return bool
*/
public function deactivate()
{
return true;
}
}