本文整理汇总了PHP中CUserOptions::DeleteOptionsByName方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserOptions::DeleteOptionsByName方法的具体用法?PHP CUserOptions::DeleteOptionsByName怎么用?PHP CUserOptions::DeleteOptionsByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUserOptions
的用法示例。
在下文中一共展示了CUserOptions::DeleteOptionsByName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildElementList
public function buildElementList($iblockId, $columns = array(), $params = array())
{
$this->initializeVars($iblockId);
/** @example */
/*
$columns = array(
'NAME',
'SORT',
'ID',
'PROPERTY_LINK',
); */
$opts = array();
foreach ($columns as $columnCode) {
$opts[] = $this->prepareCode($columnCode);
}
$opts = implode(',', $opts);
$params = array_merge(array('name_prefix' => 'tbl_iblock_element_', 'category' => 'list', 'page_size' => 20, 'order' => 'desc', 'by' => 'id'), $params);
$name = $params['name_prefix'] . md5($this->iblock['IBLOCK_TYPE_ID'] . "." . $iblockId);
$value = array('columns' => $opts, 'order' => $params['order'], 'by' => $params['by'], 'page_size' => $params['page_size']);
\CUserOptions::DeleteOptionsByName($params['category'], $name);
\CUserOptions::SetOption($params['category'], $name, $value, true);
}
示例2: define
define("NO_KEEP_STATISTIC", true);
define("NO_AGENT_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if ($USER->IsAuthorized() && check_bitrix_sessid()) {
//get saved columns and sorting from user settings
$aOptions = CUserOptions::GetOption("main.interface.form", $_REQUEST["FORM_ID"], array());
if ($_REQUEST["action"] == "expand") {
$aOptions["expand_tabs"] = $_REQUEST["expand"] == "Y" ? "Y" : "N";
} elseif ($_REQUEST["action"] == "enable") {
$aOptions["settings_disabled"] = $_REQUEST["enabled"] == "Y" ? "N" : "Y";
} elseif ($_REQUEST["action"] == "settheme") {
$aOptions["theme"] = $_REQUEST["theme"];
if ($_REQUEST["GRID_ID"] != '') {
$aGridOptions = CUserOptions::GetOption("main.interface.grid", $_REQUEST["GRID_ID"], array());
$aGridOptions["theme"] = $_REQUEST["theme"];
CUserOptions::SetOption("main.interface.grid", $_REQUEST["GRID_ID"], $aGridOptions);
}
} elseif ($_REQUEST["action"] == "savesettings") {
CUtil::decodeURIComponent($_POST);
$aOptions["tabs"] = $_POST["tabs"];
if ($_REQUEST["set_default_settings"] == "Y" && $USER->CanDoOperation('edit_other_settings')) {
if ($_REQUEST["delete_users_settings"] == "Y") {
CUserOptions::DeleteOptionsByName("main.interface.form", $_REQUEST["FORM_ID"]);
}
CUserOptions::SetOption("main.interface.form", $_REQUEST["FORM_ID"], $aOptions, true);
}
}
CUserOptions::SetOption("main.interface.form", $_REQUEST["FORM_ID"], $aOptions);
}
echo "OK";
示例3: serialize
}
$updatedReports[$reportID] = serialize($reportSettings);
}
}
}
if (!empty($updatedReports)) {
foreach ($updatedReports as $reportID => &$reportSettings) {
$reportID = intval($reportID);
$expression = $DB->PrepareUpdate('b_report', array('SETTINGS' => $reportSettings), 'report');
$sql = "UPDATE b_report SET {$expression} WHERE ID = {$reportID}";
$DB->QueryBind($sql, array('SETTINGS' => $reportSettings), false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
$dbRes = CUserOptions::GetList(array("ID" => "ASC"), array('CATEGORY' => 'report', 'NAME_MASK' => 'view_params_' . $reportID . '_'));
if (is_object($dbRes)) {
while ($row = $dbRes->fetch()) {
if (strpos($row['NAME'], 'view_params_' . $reportID . '_') === 0) {
CUserOptions::DeleteOptionsByName('report', $row['NAME']);
}
}
}
unset($dbRes);
}
}
unset($reportSettings);
}
if (empty($error)) {
$message = Loc::getMessage('SALE_CONVERTER_AJAX_STEP_UPDATE_BASKET');
$type = 'PROCESS';
// SITE_START
COption::SetOptionString("main", "site_stopped", "N");
$result['NEXT_STEP'] = ++$ajax_step;
} else {
示例4: handleUserTypeDelete
public static function handleUserTypeDelete($arField)
{
if (is_array($arField) && isset($arField['FIELD_NAME']) && $arField['FIELD_NAME'] == 'UF_BXDAVEX_MAILBOX') {
CUserOptions::DeleteOptionsByName('dav', 'davex_mailbox');
}
}