本文整理汇总了PHP中CUserOptions::SetOptionsFromArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserOptions::SetOptionsFromArray方法的具体用法?PHP CUserOptions::SetOptionsFromArray怎么用?PHP CUserOptions::SetOptionsFromArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUserOptions
的用法示例。
在下文中一共展示了CUserOptions::SetOptionsFromArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Copyright
<?php
##############################################
# Bitrix Site Manager #
# Copyright (c) 2002-2007 Bitrix #
# http://www.bitrixsoft.com #
# mailto:admin@bitrixsoft.com #
##############################################
// define("NO_KEEP_STATISTIC", true);
// define("NO_AGENT_STATISTIC", true);
// define("NOT_CHECK_PERMISSIONS", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
if ($USER->IsAuthorized() && check_bitrix_sessid()) {
if ($_GET["action"] == "delete" && $_GET["c"] != "" && $_GET["n"] != "") {
CUserOptions::DeleteOption($_GET["c"], $_GET["n"], $_GET["common"] == "Y" && $GLOBALS["USER"]->CanDoOperation('edit_other_settings'));
}
if (is_array($_REQUEST["p"])) {
$arOptions = $_REQUEST["p"];
CUtil::decodeURIComponent($arOptions);
CUserOptions::SetOptionsFromArray($arOptions);
}
}
echo "OK";
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_after.php";
示例2: SetCookieOptions
public static function SetCookieOptions($cookieName)
{
//last user setting
$varCookie = array();
parse_str($_COOKIE[$cookieName], $varCookie);
setcookie($cookieName, false, false, "/");
if (is_array($varCookie["p"]) && $varCookie["sessid"] == bitrix_sessid()) {
$arOptions = $varCookie["p"];
CUtil::decodeURIComponent($arOptions);
CUserOptions::SetOptionsFromArray($arOptions);
}
}
示例3: InstallIblockSectionSettings
private function InstallIblockSectionSettings()
{
//Iblock Section Edit form, simplify
$arIBSFormEditSetting = array(array("c" => "form", "n" => "form_section_" . $this->arResult["INSTALLATION"]["IBLOCK_ID"], "d" => "Y", "v" => array("tabs" => "edit1--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_TAB_TITLE") . "--,--ID--#--ID--,--ACTIVE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_ACTIVE") . "--,--NAME--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_NAME") . "--,--CODE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_CODE") . "--,--IBLOCK_SECTION_ID--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_IBLOCK_SECTION_ID") . "--,--SORT--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_SORT") . "--;--")));
CUserOptions::SetOptionsFromArray($arIBSFormEditSetting);
}
示例4: ImportFormsFromXML
public static function ImportFormsFromXML($BID, $xmlPath, $arOldNewID)
{
if (file_exists($xmlPath) && $BID && CModule::IncludeModule('iblock')) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/classes/general/xml.php';
$xml = new CDataXML();
if ($xml->Load($xmlPath)) {
if ($node = $xml->SelectNodes('/asd_iblock_props/form_element/')) {
$tabs = $node->textContent();
foreach ($arOldNewID as $old => $new) {
$tabs = str_replace('--PROPERTY_' . $old . '--', '--PROPERTY_' . $new . '--', $tabs);
}
$arOptions = array(array('d' => 'Y', 'c' => 'form', 'n' => 'form_element_' . $BID, 'v' => array('tabs' => $tabs)));
CUserOptions::SetOptionsFromArray($arOptions);
}
if ($node = $xml->SelectNodes('/asd_iblock_props/form_section/')) {
$tabs = $node->textContent();
$arOptions = array(array('d' => 'Y', 'c' => 'form', 'n' => 'form_section_' . $BID, 'v' => array('tabs' => $tabs)));
CUserOptions::SetOptionsFromArray($arOptions);
}
}
}
}