forked from appleple/acms-google-calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceProvider.php
More file actions
104 lines (92 loc) · 2.78 KB
/
Copy pathServiceProvider.php
File metadata and controls
104 lines (92 loc) · 2.78 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
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
<?php
namespace Acms\Plugins\GoogleCalendar;
use ACMS_App;
use Acms\Services\Common\HookFactory;
use Acms\Services\Common\InjectTemplate;
use Acms\Services\Facades\Storage;
class ServiceProvider extends ACMS_App
{
public $version = '1.0.2';
public $name = 'Google Calendar';
public $author = 'com.appleple';
public $module = false;
public $menu = 'google_calendar_index';
public $desc = 'フォームの内容を Google Calendar に登録するためのアプリです。';
/**
* サービスの起動処理
*/
public function init()
{
// GoogleCalendarAPI使用準備
require_once dirname(__FILE__).'/vendor/autoload.php';
$hook = HookFactory::singleton();
$hook->attach('GoogleCalendar', new Hook);
$inject = InjectTemplate::singleton();
if (ADMIN === 'app_google_calendar_index') {
$inject->add('admin-topicpath', PLUGIN_DIR . 'GoogleCalendar/theme/topicpath.html');
$inject->add('admin-main', PLUGIN_DIR . 'GoogleCalendar/theme/index.html');
} else if (ADMIN === 'app_google_calendar_callback') {
$inject->add('admin-topicpath', PLUGIN_DIR . 'GoogleCalendar/theme/topicpath.html');
$inject->add('admin-main', PLUGIN_DIR . 'GoogleCalendar/theme/callback.html');
}
$inject->add('admin-form', PLUGIN_DIR . 'GoogleCalendar/theme/form.html');
// モジュール追加
$inject->add('admin-module-config-GoogleCalendar_Events', PLUGIN_DIR . 'GoogleCalendar/theme/Events_body.html');
$inject->add('admin-module-config-GoogleCalendar_DayEvents', PLUGIN_DIR .'GoogleCalendar/theme/DayEvents_body.html');
$inject->add('admin-module-select', PLUGIN_DIR . 'GoogleCalendar/theme/select.user.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;
}
}