mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 07:12:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@310 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6ebf9a84f3
commit
42bc6d7daa
10 changed files with 82 additions and 8 deletions
|
|
@ -39,9 +39,11 @@
|
|||
unset($source_args->act);
|
||||
if($source_args->menu_open_window!="Y") $source_args->menu_open_window = "N";
|
||||
$source_args->group_srls = str_replace('|@|',',',$source_args->group_srls);
|
||||
$source_args->parent_srl = (int)$source_args->parent_srl;
|
||||
|
||||
// 변수를 다시 정리 (form문의 column과 DB column이 달라서)
|
||||
$args->menu_srl = $source_args->menu_srl;
|
||||
$args->parent_srl = $source_args->parent_srl;
|
||||
$args->layout_srl = $source_args->layout_srl;
|
||||
$args->menu_id = $source_args->menu_id;
|
||||
$args->name = $source_args->menu_name;
|
||||
|
|
@ -122,6 +124,36 @@
|
|||
$this->add('menu_title', $menu_title);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief xml 파일을 갱싱
|
||||
**/
|
||||
function procMakeXmlFile() {
|
||||
// 입력값을 체크
|
||||
$menu_id = Context::get('menu_id');
|
||||
$layout = Context::get('layout');
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
|
||||
// 해당 메뉴의 정보를 구함
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayoutInfoXml($layout);
|
||||
$navigations = $layout_info->navigations;
|
||||
if(count($navigations)) {
|
||||
foreach($navigations as $key => $val) {
|
||||
if($menu_id == $val->id) {
|
||||
$menu_title = $val->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// xml파일 재생성
|
||||
$xml_file = $this->makeXmlFile($layout_srl);
|
||||
|
||||
// return 값 설정
|
||||
$this->add('menu_id',$menu_id);
|
||||
$this->add('menu_title',$menu_title);
|
||||
$this->add('xml_file',$xml_file[$menu_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메뉴의 xml 파일을 만들고 위치를 return
|
||||
**/
|
||||
|
|
@ -148,7 +180,8 @@
|
|||
foreach($node_list as $node) {
|
||||
$buff .= sprintf('<node node_srl="%s" text="%s" />', $node->menu_srl, $node->name);
|
||||
}
|
||||
$buff = "<root>".$buff."</root>";
|
||||
if($buff) $buff = "<root>".$buff."</root>";
|
||||
else $buff = "<root />";
|
||||
|
||||
$xml_file[$menu_id] = sprintf("./files/cache/layout/%s_%s.xml", $layout_srl, $menu_id);
|
||||
FileHandler::writeFile($xml_file[$menu_id], $buff);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue