本文整理汇总了PHP中CModule::store方法的典型用法代码示例。如果您正苦于以下问题:PHP CModule::store方法的具体用法?PHP CModule::store怎么用?PHP CModule::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModule
的用法示例。
在下文中一共展示了CModule::store方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$AppUI->setMsg('Module does not have a valid setup class defined', UI_MSG_ERROR);
$AppUI->redirect();
}
} else {
$setup = new $setupclass();
}
switch ($cmd) {
case 'moveup':
case 'movedn':
$obj->move($cmd);
$AppUI->setMsg('Module re-ordered', UI_MSG_OK);
break;
case 'toggle':
// just toggle the active state of the table entry
$obj->mod_active = 1 - $obj->mod_active;
$obj->store();
$AppUI->setMsg('Module state changed', UI_MSG_OK);
break;
case 'toggleMenu':
// just toggle the active state of the table entry
$obj->mod_ui_active = 1 - $obj->mod_ui_active;
$obj->store();
$AppUI->setMsg('Module menu state changed', UI_MSG_OK);
break;
case 'install':
// do the module specific stuff
$AppUI->setMsg($setup->install());
$obj->bind($config);
// add to the installed modules table
$obj->install();
$AppUI->setMsg('Module installed', UI_MSG_OK, true);
示例2:
CAppUI::setMsg("Core modules can't be uninstalled or disactivated", UI_MSG_ERROR);
CAppUI::redirect();
}
if (!$module->_files_missing) {
$setup = new $setupclass();
}
switch ($cmd) {
case "moveup":
case "movedn":
$module->move($cmd);
CAppUI::setMsg("CModule-msg-reordered", UI_MSG_OK);
break;
case "toggle":
// just toggle the active state of the table entry
$module->mod_active = 1 - $module->mod_active;
$module->store();
CAppUI::setMsg("CModule-msg-state-changed", UI_MSG_OK);
break;
case "toggleMenu":
// just toggle the active state of the table entry
$module->mod_ui_active = 1 - $module->mod_ui_active;
$module->store();
CAppUI::setMsg("CModule-msg-state-changed", UI_MSG_OK);
break;
case "remove":
$success = $module->_files_missing ? true : $setup->remove();
if ($success !== null) {
$module->delete();
CAppUI::setMsg("CModule-msg-removed", $success ? UI_MSG_OK : UI_MSG_ERROR, true);
}
break;