本文整理汇总了PHP中ConsoleOption::addNew方法的典型用法代码示例。如果您正苦于以下问题:PHP ConsoleOption::addNew方法的具体用法?PHP ConsoleOption::addNew怎么用?PHP ConsoleOption::addNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConsoleOption
的用法示例。
在下文中一共展示了ConsoleOption::addNew方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addConsoleOptions
public function addConsoleOptions($consoleCatID)
{
$consoleObj = new ConsoleOption($this->MySQL);
$consoleObj->setCategoryKeyValue($consoleCatID);
$newSortNum = $consoleObj->getHighestSortNum() + 1;
foreach ($this->pluginConsoleOptions as $consoleOptionInfo) {
$consoleObj->addNew(array("consolecategory_id", "pagetitle", "filename", "sortnum"), array($consoleCatID, $consoleOptionInfo['pagetitle'], $consoleOptionInfo['filename'], $newSortNum++));
}
}
示例2: array
}
}
}
// Checking Console Options
$arrColumns = array("consolecategory_id", "pagetitle", "filename", "sortnum", "defaultconsole", "hide", "sep");
foreach ($arrConsoleOptionNames as $key => $consoleOptionName) {
$checkConsole = $consoleOptionObj->findConsoleIDByName($consoleOptionName);
if ($checkConsole === false) {
$tempCatID = $arrConsoleCategoryIDs[$arrConsoleOptionInfo[$key]['category']];
$consoleOptionObj->setCategoryKeyValue($tempCatID);
$consoleOptionObj->resortOrder();
$highestSortNum = $consoleOptionObj->getHighestSortNum();
$newOrderNum = $highestSortNum + 1;
if ($arrConsoleOptionInfo[$key]['addsep'] == "1") {
$arrValues = array($tempCatID, "-separator-", "", $newOrderNum, "1", "", "1");
$consoleOptionObj->addNew($arrColumns, $arrValues);
$newOrderNum++;
}
$arrValues = array($tempCatID, $consoleOptionName, $arrConsoleOptionInfo[$key]['filename'], $newOrderNum, "1", $arrConsoleOptionInfo[$key]['hide'], "");
$consoleOptionObj->addNew($arrColumns, $arrValues);
$consoleOptionObj->resortOrder();
} elseif ($consoleOptionName == "Private Messages" && $checkConsole !== false && $pmCatID != "") {
$consoleOptionObj->select($checkConsole);
$consoleOptionObj->update(array("consolecategory_id", "sortnum"), array($pmCatID, 0));
$consoleOptionObj->resortOrder();
}
}
// Check for valid theme
$arrValidThemes = array();
$themeOptions .= "";
$websiteInfoObj = new WebsiteInfo($mysqli);