-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.php
97 lines (88 loc) · 2.26 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
94
95
96
97
<?php
/**
* CkEditor
*
* PHP version 7
*
* @category CkEditor
* @package Xpressengine\Plugins\CkEditor
* @author XE Developers <[email protected]>
* @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\CkEditor;
use Xpressengine\Permission\Grant;
use Xpressengine\Plugin\AbstractPlugin;
use XeSkin;
use Route;
use XeConfig;
use Xpressengine\Translation\Translator;
use Xpressengine\User\Rating;
/**
* Plugin
*
* @category CkEditor
* @package Xpressengine\Plugins\CkEditor
* @author XE Developers <[email protected]>
* @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
*/
class Plugin extends AbstractPlugin
{
/**
* 플러그인을 설치한다. 플러그인이 설치될 때 실행할 코드를 여기에 작성한다
*
* @return void
*/
public function install()
{
}
/**
* @return boolean
*/
public function unInstall()
{
// TODO: config, permission 삭제
}
/**
* @return boolean
*/
public function checkUpdated($installedVersion = NULL)
{
if (version_compare($installedVersion, '0.9.1', '<=')) {
return false;
}
return true;
}
public function update($installedVersion = null)
{
/** @var Translator $trans */
$trans = app('xe.translator');
$trans->putFromLangDataSource('ckeditor', base_path('plugins/ckeditor/langs/lang.php'));
}
/**
* boot
*
* @return void
*/
public function boot()
{
// app()->bind('xe.plugin.ckeditor', function ($app) {
// return $this;
// }, true);
}
/**
* activate
*
* @param null $installedVersion installed version
* @return void
*/
public function activate($installedVersion = null)
{
/** @var Translator $trans */
$trans = app('xe.translator');
$trans->putFromLangDataSource('ckeditor', base_path('plugins/ckeditor/langs/lang.php'));
}
}