XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
modules
menu
menu.mobile.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
11
class
menuMobile
extends
moduleObject
12
{
17
var
$result
= array();
18
23
function
straightenMenu
($menu_item, $depth)
24
{
25
if
(!$menu_item[
'link'
])
return
;
26
$obj
=
new
stdClass;
27
$obj
->href = $menu_item[
'href'
];
28
$obj
->depth = $depth;
29
$obj
->text = $menu_item[
'text'
];
30
$obj
->open_window = $menu_item[
'open_window'
];
31
$this->result[] =
$obj
;
32
if
(!$menu_item[
'list'
])
return
;
33
foreach
($menu_item[
'list'
] as $item)
34
{
35
$this->
straightenMenu
($item, $depth+1);
36
}
37
}
38
43
function
dispMenuMenu
()
44
{
45
$menu_srl =
Context::get
(
'menu_srl'
);
46
$oAdminModel =&
getAdminModel
(
'menu'
);
47
$menu_info = $oAdminModel->getMenu($menu_srl);
48
49
if
(!$menu_srl)
50
{
51
$oMenuAdminController
=
getAdminController
(
'menu'
);
52
$homeMenuCacheFile =
$oMenuAdminController
->getHomeMenuCacheFile();
53
54
if
(file_exists($homeMenuCacheFile))
55
{
56
@include($homeMenuCacheFile);
57
}
58
$menu_info->php_file =
'./files/cache/menu/'
.$homeMenuSrl.
'.php'
;
59
}
60
61
if
(file_exists($menu_info->php_file)) @include($menu_info->php_file);
62
if
(is_array($menu->list))
63
{
64
foreach
($menu->list as $menu_item)
65
{
66
$this->
straightenMenu
($menu_item, 0);
67
}
68
}
69
70
Context::set
(
'menu'
, $this->result);
71
72
$this->setTemplatePath(sprintf(
"%stpl/"
,$this->module_path));
73
$this->setTemplateFile(
'menu.html'
);
74
}
75
}
76
/* End of file menu.mobile.php */
77
/* Location: ./modules/menu/menu.mobile.php */
$oMenuAdminController
$oMenuAdminController
Definition:
ko.install.php:7
menuMobile\straightenMenu
straightenMenu($menu_item, $depth)
Definition:
menu.mobile.php:23
$obj
$obj
Definition:
ko.install.php:262
Context\set
set($key, $val, $set_to_get_vars=0)
Definition:
Context.class.php:1948
menuMobile
Definition:
menu.mobile.php:11
getAdminModel
getAdminModel($module_name)
Definition:
func.inc.php:156
menuMobile\dispMenuMenu
dispMenuMenu()
Definition:
menu.mobile.php:43
menuMobile\$result
$result
Definition:
menu.mobile.php:17
Context\get
get($key)
Definition:
Context.class.php:1973
getAdminController
getAdminController($module_name)
Definition:
func.inc.php:101
Generated on Tue Dec 18 2018 17:04:29 for XpressEngine Core by
1.8.5