mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Add MenuAdminModel::getMenuInfo()
This commit is contained in:
parent
48c357a607
commit
28352d86d1
1 changed files with 24 additions and 0 deletions
|
|
@ -74,6 +74,30 @@ class menuAdminModel extends menu
|
|||
$menu_info->php_file = sprintf('./files/cache/menu/%d.php',$menu_srl);
|
||||
return $menu_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get actual menu info data
|
||||
*
|
||||
* @param int $menu_srl
|
||||
* @return object
|
||||
*/
|
||||
public static function getMenuInfo(int $menu_srl): \stdClass
|
||||
{
|
||||
$menu = new stdClass;
|
||||
$menu->list = [];
|
||||
|
||||
$filename = sprintf('./files/cache/menu/%d.php', $menu_srl);
|
||||
if (!FileHandler::exists($filename))
|
||||
{
|
||||
getAdminController('menu')->makeXmlFile($menu_srl);
|
||||
}
|
||||
if (FileHandler::exists($filename))
|
||||
{
|
||||
include $filename;
|
||||
}
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information of a new menu from the DB, search condition is menu title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue