ThemeDesignDemoPlugin.php
1.5 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
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
namespace plugins\theme_design_demo;//Demo插件英文名,改成你的插件英文就行了
use cmf\lib\Plugin;
//Demo插件英文名,改成你的插件英文就行了
class ThemeDesignDemoPlugin extends Plugin
{
public $info = [
'name' => 'ThemeDesignDemo',//Demo插件英文名,改成你的插件英文就行了
'title' => '模板设计插件演示',
'description' => '模板设计插件演示',
'status' => 1,
'author' => 'ThinkCMF',
'version' => '1.0',
'demo_url' => 'http://demo.thinkcmf.com',
'author_url' => 'http://www.thinkcmf.com'
];
public $hasAdmin = 1;//插件是否有后台管理界面
// 插件安装
public function install()
{
return true;//安装成功返回true,失败false
}
// 插件卸载
public function uninstall()
{
return true;//卸载成功返回true,失败false
}
//实现的admin_theme_design_view钩子方法
public function adminThemeDesignView($param)
{
return $this->fetch('design');
}
}