答案 0 :(得分:2)
您可以在模块安装功能上添加菜单项。
$currentid = Tab::getIdFromClassName('YOUR_ADMINCLASS');
if (!$currentid ) {
$tab = new Tab();
$tab->active = 1;
$tab->class_name = "YOUR_ADMINCLASS";
$tab->name = array();
foreach (Language::getLanguages() as $lang){
$tab->name[$lang['id_lang']] = "DISPLAYNAME";
}
$tab->id_parent = $parentTabid;
$tab->module = $this->name;
$tab->add();
}
要作为子菜单或订单放置,请搜索$parentTabid
:
$sql = "SELECT `id_tab` FROM `"._DB_PREFIX_."tab` WHERE `class_name` LIKE 'AdminParentOrders'";
$parentTabid = Db::getInstance()->getValue($sql);