mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10792 201d5d3c-b55e-5fd7-737f-ddc643e51545
56 lines
1.1 KiB
PHP
56 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* menuMobile class
|
|
* mobile class of the menu module
|
|
*
|
|
* @author NHN (developers@xpressengine.com)
|
|
* @package /modules/menu
|
|
* @version 0.1
|
|
*/
|
|
class menuMobile extends moduleObject {
|
|
/**
|
|
* Result data list
|
|
* @var array
|
|
*/
|
|
var $result = array();
|
|
|
|
/**
|
|
* Menu depth arrange
|
|
* @return void
|
|
*/
|
|
function straightenMenu($menu_item, $depth)
|
|
{
|
|
if(!$menu_item['link']) return;
|
|
$obj->href = $menu_item['href'];
|
|
$obj->depth = $depth;
|
|
$obj->text = $menu_item['text'];
|
|
$this->result[] = $obj;
|
|
if(!$menu_item['list']) return;
|
|
foreach($menu_item['list'] as $item)
|
|
{
|
|
$this->straightenMenu($item, $depth+1);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Display menu
|
|
* @return void
|
|
*/
|
|
function dispMenuMenu() {
|
|
$menu_srl = Context::get('menu_srl');
|
|
$oAdminModel =& getAdminModel('menu');
|
|
$menu_info = $oAdminModel->getMenu($menu_srl);
|
|
if(file_exists($menu_info->php_file)) @include($menu_info->php_file);
|
|
foreach($menu->list as $menu_item)
|
|
{
|
|
$this->straightenMenu($menu_item, 0);
|
|
}
|
|
|
|
Context::set('menu', $this->result);
|
|
|
|
$this->setTemplatePath(sprintf("%stpl/",$this->module_path));
|
|
$this->setTemplateFile('menu.html');
|
|
|
|
}
|
|
}
|
|
?>
|