本文整理匯總了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;