1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace XoopsModules\Wgfilemanager; |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* You may not change or alter any portion of this comment or credits |
7
|
|
|
* of supporting developers from this source code or any supporting source code |
8
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
9
|
|
|
* |
10
|
|
|
* This program is distributed in the hope that it will be useful, |
11
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @copyright XOOPS Project https://xoops.org/ |
17
|
|
|
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
18
|
|
|
* @author Goffy - XOOPS Development Team |
19
|
|
|
*/ |
20
|
|
|
//\defined('\XOOPS_ROOT_PATH') || die('Restricted access'); |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Class Modulemenu |
24
|
|
|
*/ |
25
|
|
|
class Modulemenu |
26
|
|
|
{ |
27
|
|
|
|
28
|
|
|
/** function to create an array for XOOPS main menu |
29
|
|
|
* |
30
|
|
|
* @return array |
31
|
|
|
*/ |
32
|
|
|
public function getMenuitemsDefault() |
33
|
|
|
{ |
34
|
|
|
|
35
|
|
|
$moduleDirName = \basename(\dirname(__DIR__)); |
36
|
|
|
$subcount = 1; |
37
|
|
|
$pathname = \XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'; |
38
|
|
|
$urlModule = \XOOPS_URL . '/modules/' . $moduleDirName . '/'; |
39
|
|
|
|
40
|
|
|
require_once $pathname . 'include/common.php'; |
41
|
|
|
$helper = \XoopsModules\Wgfilemanager\Helper::getInstance(); |
42
|
|
|
|
43
|
|
|
//load necessary language files from this module |
44
|
|
|
$helper->loadLanguage('modinfo'); |
45
|
|
|
|
46
|
|
|
// start creation of link list as array |
47
|
|
|
$items = []; |
48
|
|
|
$items[$subcount]['name'] = \_MI_WGFILEMANAGER_SMNAME1; |
49
|
|
|
$items[$subcount]['url'] = $urlModule . 'index.php'; |
50
|
|
|
|
51
|
|
|
$subcount++; |
52
|
|
|
$items[$subcount]['name'] = \_MI_WGFILEMANAGER_SMNAME2; |
53
|
|
|
$items[$subcount]['url'] = $urlModule . 'directory.php'; |
54
|
|
|
|
55
|
|
|
$subcount++; |
56
|
|
|
$items[$subcount]['name'] = \_MI_WGFILEMANAGER_SMNAME3; |
57
|
|
|
$items[$subcount]['url'] = $urlModule . 'file.php?op=new'; |
58
|
|
|
// end creation of link list as array |
59
|
|
|
|
60
|
|
|
return $items; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
|
64
|
|
|
/** function to create a list of sublinks |
65
|
|
|
* |
66
|
|
|
* @return array |
67
|
|
|
*/ |
68
|
|
|
public function getMenuitemsSbadmin5() |
69
|
|
|
{ |
70
|
|
|
return $this->getMenuitemsDefault(); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
|
74
|
|
|
} |
75
|
|
|
|