-
Notifications
You must be signed in to change notification settings - Fork 6
/
plugin.php
93 lines (84 loc) · 1.99 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
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
<?php
/**
* Plugin
*
* PHP version 7
*
* @category Board
* @package Xpressengine\Plugins\Board
* @author XE Developers <developers@xpressengine.com>
* @copyright 2019 Copyright XEHub Corp. <https://www.xehub.io>
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL
* @link https://xpressengine.io
*/
namespace Xpressengine\Plugins\Board;
use Xpressengine\Plugin\AbstractPlugin;
use Xpressengine\Plugins\Board\Plugin\Database;
use Xpressengine\Plugins\Board\Plugin\Resources;
use Xpressengine\Plugins\Board\Plugin\Update;
/**
* Plugin
*
* @category Board
* @package Xpressengine\Plugins\Board
*/
class Plugin extends AbstractPlugin
{
/**
* boot
*
* @return void
*/
public function boot()
{
Resources::bindClasses();
Resources::registerTitleWithSlug();
Resources::registerRecycleBin();
Resources::registerCommands();
Resources::setDefaultSkin();
Resources::interceptDynamicField();
Resources::interceptDeleteCategory();
Resources::listenCommentRetrievedEvent();
Resources::listenCommentCreateEvent();
}
/**
* activate
*
* @param null $installedVersion installed version
* @return void
*/
public function activate($installedVersion = null)
{
}
/**install
*
* @return void
*/
public function install()
{
Database::create();
Resources::createDefaultConfig();
Resources::createShareConfig();
Resources::putLang();
}
/**
* update
*
* @param null $installedVersion install version
* @return void
*/
public function update($installedVersion = null)
{
Update::proc($installedVersion);
}
/**
* check update
*
* @param null $installedVersion
* @return bool
*/
public function checkUpdated($installedVersion = NULL)
{
return Update::check($installedVersion);
}
}