XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
helper.php
Go to the documentation of this file.
1
<?php
2
/*
3
You may not change or alter any portion of this comment or credits
4
of supporting developers from this source code or any supporting source code
5
which is considered copyrighted (c) material of the original comment or credit authors.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
19
class
Menus
extends
Xoops\Module\Helper\HelperAbstract
20
{
26
public
function
init
()
27
{
28
$this->
setDirname
(
'menus'
);
29
}
30
34
public
static
function
getInstance
()
35
{
36
return
parent::getInstance();
37
}
38
42
public
function
getHandlerMenus
()
43
{
44
return
$this->
getHandler
(
'menus'
);
45
}
46
50
public
function
getHandlerMenu
()
51
{
52
return
$this->
getHandler
(
'menu'
);
53
}
54
61
public
function
getSkinInfo
($skin, $skin_from_theme =
false
)
62
{
63
$error
=
false
;
64
$path
=
''
;
65
if
($skin_from_theme) {
66
$path
=
"themes/"
. $this->
xoops
()->getConfig(
'theme_set'
) .
"/menu"
;
67
if
(!
XoopsLoad::fileExists
($this->
xoops
()->
path
(
"{$path}/skin_version.php"
))) {
68
$error
=
true
;
69
}
70
}
71
72
if
(
$error
|| !$skin_from_theme) {
73
$path
=
"modules/menus/skins/{$skin}"
;
74
}
75
76
$file
= $this->
xoops
()->path(
"{$path}/skin_version.php"
);
77
$info
= array();
78
79
if
(
XoopsLoad::fileExists
(
$file
)) {
80
include
$file
;
81
$info
=&
$skinversion
;
82
}
83
84
$info
[
'path'
] = $this->
xoops
()->path(
$path
);
85
$info
[
'url'
] = $this->
xoops
()->url(
$path
);
86
87
if
(!isset(
$info
[
'template'
])) {
88
$info
[
'template'
] = $this->
xoops
()->path(
"modules/menus/templates/block.tpl"
);
89
}
else
{
90
$info
[
'template'
] = $this->
xoops
()->path(
"{$path}/"
.
$info
[
'template'
]);
91
}
92
93
if
(!isset(
$info
[
'prefix'
])) {
94
$info
[
'prefix'
] = $skin;
95
}
96
97
if
(isset(
$info
[
'css'
])) {
98
$info
[
'css'
] = (array)
$info
[
'css'
];
99
foreach
(
$info
[
'css'
] as $key => $value) {
100
$info
[
'css'
][$key] = $this->
xoops
()->url(
"{$path}/{$value}"
);
101
}
102
}
103
104
if
(isset(
$info
[
'js'
])) {
105
$info
[
'js'
] = (array)
$info
[
'js'
];
106
foreach
(
$info
[
'js'
] as $key => $value) {
107
$info
[
'js'
][$key] = $this->
xoops
()->url(
"{$path}/{$value}"
);
108
}
109
}
110
111
if
(!isset(
$info
[
'config'
])) {
112
$info
[
'config'
] = array();
113
}
114
115
return
$info
;
116
}
117
}
Menus\getHandlerMenu
getHandlerMenu()
Definition:
helper.php:50
$path
$path
Definition:
execute.php:31
$error
if(empty($settings['ROOT_PATH'])) elseif(empty($settings['DB_PARAMETERS'])) $error
Definition:
page_configsave.php:41
Xoops\Module\Helper\HelperAbstract\xoops
xoops()
Definition:
HelperAbstract.php:88
Xoops\Module\Helper\HelperAbstract\path
path($path= '')
Definition:
HelperAbstract.php:181
$file
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
Definition:
browse.php:55
$skinversion
$skinversion['template']
Definition:
skin_version.php:21
Menus
Menus\getInstance
static getInstance()
Definition:
helper.php:34
Menus\getSkinInfo
getSkinInfo($skin, $skin_from_theme=false)
Definition:
helper.php:61
Menus\getHandlerMenus
getHandlerMenus()
Definition:
helper.php:42
XoopsLoad\fileExists
static fileExists($file)
Definition:
xoopsload.php:506
$info
if(isset($_POST['name'])) $info
Definition:
execute.php:57
include
Xoops\Module\Helper\HelperAbstract\getHandler
getHandler($name)
Definition:
HelperAbstract.php:123
Xoops\Module\Helper\HelperAbstract\setDirname
setDirname($dirname)
Definition:
HelperAbstract.php:45
Menus\init
init()
Definition:
helper.php:26
HelperAbstract
usr64
htdocs
modules
menus
class
helper.php
Generated on Fri May 22 2015 03:07:03 for XOOPS by
1.8.9.1