Revision 19447,
1.3 KB
checked in by miningbrownie, 12 years ago
(diff) |
auto commit by watch
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | |
---|
4 | class TestPlugin1 extends SC_Plugin_Ex { |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | function enable(String $classname){ |
---|
9 | return preg_match('/shopping|payment|products/',$classname)? |
---|
10 | !preg_match('/list/', $classname) |
---|
11 | :false |
---|
12 | ; |
---|
13 | } |
---|
14 | |
---|
15 | function init(){ |
---|
16 | |
---|
17 | } |
---|
18 | |
---|
19 | |
---|
20 | function getVersion(){ |
---|
21 | return "0.0.1"; |
---|
22 | } |
---|
23 | |
---|
24 | function getName(){ |
---|
25 | return "TestPlugin1"; |
---|
26 | } |
---|
27 | |
---|
28 | function process(){ |
---|
29 | |
---|
30 | } |
---|
31 | |
---|
32 | function mobileprocess(){ |
---|
33 | |
---|
34 | } |
---|
35 | |
---|
36 | public function install(){ |
---|
37 | $objQuery = new SC_Query(); |
---|
38 | |
---|
39 | $arrPlugins = $objQuery->get("dtb_plugin", "plugin_id", "plugin_name = ?",array($name)); |
---|
40 | if(count($arrPlugins) == 0){ |
---|
41 | $data = array( |
---|
42 | 'plugin_name' => $objForm->getValue('plugin_name'), |
---|
43 | 'path' => realpath(DATA_DIR.'/plugin/'.$objForm->getValue('plugin_name').'/'), |
---|
44 | 'enable' => '1', |
---|
45 | 'del_flg' => '0', |
---|
46 | 'class_name' => $objForm->getValue('plugin_name'), |
---|
47 | 'version' => $this->getVersion() |
---|
48 | |
---|
49 | ); |
---|
50 | } |
---|
51 | $objQuery->insert("dtb_plugin", $data); |
---|
52 | |
---|
53 | |
---|
54 | } |
---|
55 | |
---|
56 | public function uninstall(){ |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
60 | /** |
---|
61 | * |
---|
62 | * @return String インストール用のSQL |
---|
63 | */ |
---|
64 | protected function getInstallSQL(){ |
---|
65 | |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
69 | protected function getUninstallSQL(){ |
---|
70 | |
---|
71 | } |
---|
72 | |
---|
73 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.