当前位置: 首页>>代码示例>>PHP>>正文


PHP CUserOptions::DeleteOptionsByName方法代码示例

本文整理汇总了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);
 }
开发者ID:andreyryabin,项目名称:sprint.migration,代码行数:22,代码来源:AdminIblockHelper.php

示例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";
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:settings.php

示例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 {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:converter.php

示例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');
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:6,代码来源:exchangemail.php


注:本文中的CUserOptions::DeleteOptionsByName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。